Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

KeepNETObject

KeepNETObject[object]
causes the specified object(s) not to be released when the current NETBlock ends.
KeepNETObject[object, Manual]
causes the specified object to escape from all enclosing NETBlock expressions, meaning that the object will only be released if you manually call ReleaseNETObject.
  • To use KeepNETObject, you first need to load .NET/Link using Needs["NETLink`"].
  • KeepNETObject allows an object to "escape" from the current NETBlock.
  • It only has an effect if the object was in fact slated to be released by that block.
  • The object is promoted to the "release" list of the next-enclosing NETBlock, if there is one. The object will be released when that block ends (unless KeepNETObject is called again in the outer block).
© 2013 Wolfram Research, Inc. Japanese
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team