Unit 'sysutils' Package
[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] [#rtl]


Free object if needed, and set object reference to Nil.


Source position: sysutilh.inc line 332

procedure FreeAndNil(

  var obj



FreeAndNil will free the object in Obj and will set the reference in Obj to Nil. The reference is set to Nil first, so if an exception occurs in the destructor of the object, the reference will be Nil anyway.


Exceptions that occur during the destruction of Obj are not caught.

Documentation generated on: Jul 24 2023