2012年5月17日 星期四

Local static variable destruction

Local static variable dead time can't be confirmed. So we should avoid to use other local static variable at the destructor.
Static variables are allocated at stack and follow FILO rule. If you generate static A before static B, and A use B's attribute in A's destructor, finally A will crash in the deconstruction time, because B has dreaded... Remember!! Stack is FILO.

沒有留言:

張貼留言