[DUG] Usage - initialization and finalization

Conor Boyd Conor.Boyd at trimble.co.nz
Fri May 19 14:11:11 NZST 2006


I would suggest that a more OO (and less form-oriented) approach to this
would be to "set initial stuff up and then release stuff" in
constructors and destructors, respectively.
 
If you follow the one class = one unit ideal, then you could also look
at the Initialization and Finalization sections as being "static
constructors" or "type initializers/finalizers" to use generic OO and
.NET terms respectively for what one generally uses these sections for.
 
Maybe that's some use to somebody...
 
Conor

________________________________

From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz]
On Behalf Of Paul A Norman



[snip] 

Otherwise I've used the onFormComplete and onDestroy to set intial stuff
up and then release stuff. 
 
But I am guessing that Finailization is a better place to release stuff
(help avoid memoery leakage under certain circumstances?), but
Initialization would have to be used for Finalization to be acceptable..


[snip] 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ns3.123.co.nz/pipermail/delphi/attachments/20060519/66f9b275/attachment.html


More information about the Delphi mailing list