Thema: Delphi Free Objects in List

Einzelnen Beitrag anzeigen

Udontknow

Registriert seit: 17. Jun 2002
223 Beiträge
 
#2

Re: Free Objects in List

  Alt 18. Apr 2007, 14:18
Hello there!

As the method "Free" is implemented nonvirtual in the main ancestor class TObject, a call of "TListObject(MyObject).Free" is always equal to "MyObject.Free" and will cause a call to the destructor "Destroy". If you dont override the destructor of a descendant class, there is still the destructor "TObject.Destroy" that is inherited. Every object has at least this destructor.

Cu,
Udontknow
  Mit Zitat antworten Zitat