On 13.04.2016 21:30, Mazola Winstrol wrote: > 2016-04-13 15:56 GMT-03:00 Jonas Maebe <jonas.ma...@elis.ugent.be > <mailto:jonas.ma...@elis.ugent.be>>: > > > And hence you can just initialise those variables in the > initialization section of the library and finalize them (if > necessary) in the finalization section of the library. > > > Thanks! > > Can i use class constructors in shared libraries? Does unit's > initialization section and class constructors have the same behaviour in > all platforms and the same when compared with a normal program?
Yes and mostly yes. The finalization sections might not be called in the context of the same thread as the initialization sections, because if the thread that does the last unload of the library (if it is dynamically loaded) then it's called in that thread's context. But other then that they behave the same as for normal programs. Regards, Sven _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal