ReleaseNETObject

ReleaseNETObject[obj]
tells the .NET memory-management system to forget any references to the specified that are being maintained solely for the sake of Mathematica.

DetailsDetails

  • To use ReleaseNETObject, you first need to load .NET/Link using Needs["NETLink`"].
  • The in Mathematica is no longer valid after the call.
  • Call ReleaseNETObject when you are completely finished with an object in Mathematica and want to allow it to be garbage-collected in .NET.
New to Mathematica? Find your learning path »
Have a question? Ask support »