Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


ID: 24041, Class destructors

by Mauro Venturini Email: Anonymous


Class destructors for Delphi.NET classes
Download Details
FTP  download also available
CDN Login Required to Download. (You will be redirected to the login page if you click on the Download Link)
To download this, you must have registered:
A free membership

For Delphi, Version 10.0  to 10.0 95 downloads
Copyright: No significant restrictions


Size: 24,308 bytes
Updated on Mon, 24 Jul 2006 08:22:46 GMT
Originally uploaded on Mon, 24 Jul 2006 08:22:39 GMT
SHA1 Hash: BC3ED3079415DB9423EE533BFC7CCB0158EE83F5
MD5 Hash: 569A8655C1FE9D028DA898FD3813BAC9

    Explore the files in this upload

Description
Delphi.NET provides two solutions for class initialization and finalization: unit initialization and finalization and class constructor.

Unit initialization code is executed at the beginning of the program execution and finalization code is executed at the end of the program execution but the code is executed even if that is not required because no code from the unit is actually used. Moreover, unit initialization and finalization are not standard .NET features and are not executed if inside an assembly used from a C# or VB.NET program.

On the other hand a class constructor is executed only if the class is actually used and it is a standard .NET feature but no class destructor seems to be available.

Fortunately, a class destructor can be readily implemented starting from finalization and garbage collection.

   Latest Comments  View All Add New

Move mouse over comment to see the full text

Could not retrieve comments. Please try again later.

Server Response from: ETNACDC03