Reputation: 1536
I just found out that there is static initialization fiasco problem in c++, I am just curious, is this only c++ problem? or maybe this problem is already fixed even in c++?
Upvotes: -3
Views: 92
Reputation: 13634
In Delphi, each unit can have initialization
and finalization
section. (Unit is single source file).
Provided that there are no circular dependencies between units, initialization
of dependency would come before than initialization
of dependent module. Finalization order is reverse.
I think this is an example of that the problem could have been avoided.
Upvotes: 0