DisposeAndNil (Compiler Magic Function)

From RemObjects Software

Jump to: navigation, search

This is a Oxygene Language Feature topic
Feel free to add your notes to this topic below.



The "disposeAndNil()" Function

As its name suggests, this function provides a convenient way of disposing of an object and nil-ing the reference to it, For example:

disposeAndNil(AnObject);

This is equivalent to the following code:

if assigned(AnObject) and (AnObject is IDisposable) then
    AnObject.Dispose;
  AnObject := nil;


See Also


Product: RemObjects Oxygene (formerly known as Chrome)
Current version: 3.0 Previous Versions: 'Joyride' (2.0), 'Floorshow' (1.5), 'Adrenochrome' (1.0)

GlossaryKeywordsLanguage FeaturesPlatform FeaturesSamplesArticlesHow ToIssues

Personal tools