Handles

Various resources are created during the definition of a scene, these resources are referenced in the Tcl code with handles. A handle is similar to a file id number returned by the open system call. It is an abstract entity that provides a reference to a resource that is internally managed. The following handles for the following resources are provided:

When a unreference operation is performed on a handle, a reference count is decremented, the resource is not actually deleted unless the reference count goes to zero. The handle itself is deleted. Thus an object is not released until its is handle is unreferenced and it is no longer a subobject of any object. This behavior applies to objects, surfaces, shaders and pixmaps.