NETLink`
NETLink`

ReleaseNETObject

ReleaseNETObject[obj]

tells the .NET memory-management system to forget any references to the specified NETObject that are being maintained solely for the sake of the Wolfram Language.

Details

  • To use ReleaseNETObject, you first need to load .NET/Link using Needs["NETLink`"].
  • The NETObject in the Wolfram Language is no longer valid after the call.
  • Call ReleaseNETObject when you are completely finished with an object in the Wolfram Language and want to allow it to be garbage-collected in .NET.

See Also

NETBlock  BeginNETBlock  EndNETBlock  LoadedNETObjects

Tutorials