[Overview][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'LCLProc' (#lcl)

# FreeThenNil (deprecated)

Frees the TObject instance (when assigned) before setting the reference to Nil.

## Declaration

Source position: lclproc.pas line 114

`procedure FreeThenNil(`
`var obj`
`);`

## Arguments

`obj` |  | The object reference freed and Nil'd in the routine.

## Description

Calls the FreeThenNil routine in the lazutilities.pas unit from the lazutils package.

## Version info

Deprecated in LCL version 3.0. Use the FreeThenNil routine in the LazUtilities.pas unit from the LazUtils package instead.

## See also

LazUtilities.FreeThenNil