JCL Help:FreeAndNil

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Frees an object reference and replaces it with nil.


Parameters

Parameters Description
Obj Reference to an instance of a TObject descendant to free. Upon return the Obj variable has been reset to nil so future references ensure a relatively easy to understand access violation.


Description

FreeAndNil frees the object instance pointed to by Obj and replaces the reference with nil. This ensures that the reference is nil after the object has been destroyed and helps debugging. Do not use this routine on objects or generic pointers which are not TObject descendants. For generic pointers you can use the FreeMemAndNil procedure.


See Also

FreeMemAndNil


About

Donator

Marcel van Brakel


Contribute to this help topic

This documentation wiki is based on the collaborative effort of Project JEDI users. Your edits are welcome in order to improve documentation quality: edit this page