Sign in Join
FPDoc Onlineexperiment

FreeThenNil procedure

In unit LazUtilities

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

Declaration

pascal
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.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.