[Overview][Types][Procedures and functions][Variables][Index] Reference for unit 'LazUtilities' (#lazutils)

FreeThenNil

Ensures that the specified object instance is freed and set to Nil.

Declaration

Source position: lazutilities.pas line 25

procedure FreeThenNil(

  var obj

);

Arguments

obj

  

Object instance modified in the routine.

Description

FreeThenNil is a procedure used to ensure that the object instance in obj is freed and set to Nil. If obj has been assigned, it is cast to a TObject instance and its Free method is called. Finally, the pointer to the address in obj is set to Nil.


Version 4.0 Generated 2025-05-03 Home