Forum > Beginners

Building a Class hierarchy

<< < (2/2)


--- Quote from: Nitorami on February 21, 2015, 08:08:38 pm ---
But this brings me to another issue I never understood: You are using MyVar.Free to remove MyVar from memory. But usually TMyClass would have a destructor which should be called first, or not ?

--- End quote ---

Free is basically a helper method that does

--- Code: --- if self<>nil then self.destroy;
--- End code ---

IOW it calls the destructor with an extra NIL check.


[0] Message Index

[*] Previous page

Go to full version