これは,Wolfram言語の以前のバージョンに基
づくMathematica 6のためのドキュメントです.
最新のドキュメント(バージョン11.2)もご覧ください.

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.
  • 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).