Destroy an object and release all memory.
Source position: objects.pp line 289
procedure TObject.Free; |
Free calls the destructor of the object, and releases the memory occupied by the instance of the object.
No checking is performed to see whether self is nil and whether the object is indeed allocated on the heap.
|
Construct (initialize) a new object. |
|
|
Destroy an object. |
program ex7; { Program to demonstrate the TObject.Free call } Uses Objects; Var O : Objectate the Objectcall } begin // Allocate memory for object. O:=New(Object; // Free memory of object. O^.free; end.