[Lazarus] initiliazation, finalization and AddExitProc

Frank Church vfclists at gmail.com
Fri Feb 8 13:42:53 CET 2013


I want to implement the SetHeapTraceOutput routine mentioned in this
thread - http://lists.lazarus.freepascal.org/pipermail/lazarus/2011-December/069226.html

I also want to do it in a tidy manner, perhaps create some kind of
application template which contains it, and I think it should be in
the finalization sections of the application or something like that,
probably with the use of AddExitProc.

How would it all hang together? Are the initialization and
finalization sections in a unit run when the program starts, or are
they run when something in the unit is created?
eg if a form is not created automatically by the application would its
initialization section be run at the state of the program regardless
of whether something defined is used, and woulld that also apply to
its finalization section?


-- 
Frank Church

=======================
http://devblog.brahmancreations.com




More information about the Lazarus mailing list