[fpc-pascal] library (win32 dll) finalization section - what is allowed and what not?

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Oct 4 15:44:31 CEST 2010


On 04 Oct 2010, at 15:28, Bernd Kreuss wrote:

> Currently I am poking around in the dark and doing some trial and  
> error
> and try to leave this section alone (as much as possible). Is there
> anything I could read that would tell me clearly what is actually
> allowed here and in which order things are uninitialized so I can see
> myself what must fail and why and what can be safely done?

I don't know anything about Windows specifically, but FPC always  
executes the finalization sections of all units in the opposite order  
compared to how the initialization sections were called. The  
initialization order is determined by the unit dependencies (processed  
in the order in which units appear in the uses-clauses, using a depth- 
first approach), but note that the order is hard to predict if you  
have circular dependencies.


Jonas



More information about the fpc-pascal mailing list