Handles are references to anonymous ECLiPSe objects (such as streams, engines, bags, records, shelves, stores) or to objects created via the foreign language interfaces.
Handles are important for memory management: an object can be freed as soon as it is no longer referenced. Normally, handles disappear automatically when they are no longer in use, typically on failure or on garbage collection. However, garbage collection may happen with some delay, during which more memory remains in use than necessary.
handle_close/1 explicitly closes a handle, making it no longer refer to its target object. The target object may thus become unreferenced, destroyed and deallocated sooner than would otherwise have been the case.
The closed handle can no longer be used and is classified as 'stale' ([]) by is_handle/2. Closing a handle is NOT undone by backtracking.