Use myObject.Release :
Marks this TFmxObject for deferred deletion.
Direct actions in this method:
- set Parent = nil
- insert an object into the slow delete list
Delayed action:
- free object from the list (
vPurgatory ).
Remember that this Free method (and the FreeAndNil procedure) does not delete the object itself on mobile platforms:
// under ARC, this method is not actually called, because the compiler translates // the call is a simple assignment of nil to an instance variable, which then calls _InstClear
source share