ucReleaseItem

 

See Also: ucDefine, ucDefineFunction, ucDefineSyntax, ucDefineVariable, ucParse, ucNewThread

 

Releases a uCalc item.

 

ucReleaseItem(ItemHandle)

 

Parameter

 

ItemHandle

Required.  ItemHandle  is the handle of an item that was defined using either uCalc, ucDefine, ucDefineFunction, ucDefineOperator, ucDefineSyntax, ucDefineVariable, ucParse, or ucNewThread.

 

 

Remarks

 

Virtually everything that can be defined in uCalc is given a handle.  You can use this handle to release the item.

 

Items that are re-defined many times on a temporary basis should generally be released when the temporary definition is no longer needed.

 

If ItemHandle is the handle of a thread, then all items defined under that thread are released together, sparing you the need to explicitly release each individual item.

 

Each item is assigned a handle that is unique across the current process, regardless of which thread it belongs to.  When you define an item, you tell uCalc which thread you want the definition to be associated with.  uCalc keeps track of the thread an item belongs to.  Thus a thread handle is not required when releasing an item (unless the item you are releasing is itself a thread).

 

It is possible to hide a given definition, by defining a new item with the same name and/or attributes.  You can revert back to a previous definition by releasing the latest definitions.  This allows you to temporarily localize a definition.

 

 

Examples:

 

See ucParse -- for releasing an expression and a variable

See ucDefineVariable -- for temporary localization

See ucNewThread -- for releasing a thread

 

 

New or Enhanced

 

Issues for users migrating from version 2.0