The TclObject release method in the tcl.lang package library is used to free up memory used by a TclObject object. A TclObject object is a representation of a Tcl value, and release is used to ensure that it is properly disposed of when it is no longer needed.
Example 1:
TclObject obj = interprete.Eval("1+2"); //create a TclObject object, and let the Tcl interpreter evaluate the expression "1+2" int value = obj.AsInt(); //get the integer value of the TclObject obj.Release(); //Release the TclObject, freeing up memory
Example 2:
TclObject obj = new TclObject("hello world"); //create a TclObject object, with the value "hello world" string value = obj.ToString(); //get the string representation of the TclObject obj.Release(); //Release the TclObject, freeing up memory
In both examples, we created a TclObject object, used it in some way, and then called the Release method to free up memory. The tcl.lang package library contains many other classes and methods for working with Tcl values and for manipulating the Tcl interpreter.
C# (CSharp) tcl.lang TclObject.release - 22 examples found. These are the top rated real world C# (CSharp) examples of tcl.lang.TclObject.release extracted from open source projects. You can rate examples to help us improve the quality of examples.