|Subject:||Destructors in records (BDS2006)|
|Posted by:||Timokhov Dimitry (dtimokh…@vkkb.ru)|
|Date:||Tue, 28 Mar 2006|
As I can see in manual destructors are not available in records.
How can I write method that will be automatically executed when record is
going out of scope?
TMyRec = record
procedure Destruction(); // analoque of destructor
// SomeMethod allocates memory from heap.
// HERE I want to free memory allocated in SomeMethod by automatically
calling of TMyRec.Destruction
Or I must explicitly call TMyRec.Destruction?