On Thu, Mar 31, 2016 at 11:28 AM, Michael Van Canneyt < mich...@freepascal.org> wrote: [...]
> I suspect the problem is not in the mode, but in detecting whether a class > is used > or not in a program. It becomes very complicated when you use e.g. > run-time packages. > Hm... so FPC class constructor (or class initialization) works like unit initialization. > Delphi itself is buggy in this regard, and has been since at least D7. > For this reason, in general I advise against extensive use of > initialization sections etc... Thanks for sharing this information. It's hard to make test-case when the code has an extensive use of initialization sections, so currently I'm avoiding it too. However, I need to register some classes in a class list, so I'm changing my code to do it in some place like application initialization. -- Silvio Clécio
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal