JCL Help:FreeMemAndNil

From Project JEDI Wiki
Jump to navigationJump to search


Summary

Frees a block of memory and sets the reference to nil.


Pascal

 procedure FreeMemAndNil(var P: Pointer);


Parameters

Parameters Description
var P: Pointer Reference to the memory block to release. Upon return the P variable has been reset to nil so future references ensure a relatively easy to understand access violation.


Description

FreeMemAndNil frees the memory pointed to by P and replaces the reference with nil. This ensures that the reference is nil after the memory has been released and helps debugging. Do not use this routine on objects or TObject descendants. For TObject (descendants) you can use the FreeAndNil procedure.


See Also

FreeAndNil


About

Unit

JclSysUtils


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