What is the best/safest way to free objects from memory in units in a Delphi
Firemonkey Multi Device project?
Which of the following do I use or maybe somethings else?
FreeAndNil(object);
object.free;
object := nil;
object.DisposeOf
object := nil;
Or maybe something with ‘FreeInstance’ or ‘CleanupInstance’
BTW I know that for Forms the best way is to use the ‘OnClose’ event and then call:
Action := TCloseAction.caFree;
I only want to know how to free the memory for my own object classes.