company logo

Property :: closeAll - Close all property handles for the same cursor object

In contrast to close(), the function destroys the cursor object referenced in the property handle. This will invalidate all property handles (close()), which refer to the same cursor. When the cursor in not a cursor copy, but copies have been created for the cursor (cursorCopy()), those are destroyed, too, and referring property handles become invalid.

Usually, destroying cursors properly is managed by the system. When, however, creating external files, those will be written (closed), when the cursor will be destroyed. Hence, when writing external files via property handle, one should call closeAll() in order to close the cursor object and the file inclusive.

The function may be called for top properties, i.e. properties, which have been opened for an object space, or any kind of application property handle or property handles created by calling cursorCopy(). The function must not be called for child properties, e.g. properties, that have been provided by calling property() in order to get access to references or relationships in an object instance, since cursors for sub properties are owned by the instance and managed by the system.

Since transient properties, in fact refer to two property handles (the transient property handle and the referenced property handle), closing transient properties is possible in different ways (see example below).

// close referenced property and all copies - transient property remains opened

  prop.closeAll(true);

// close transient property and all copies - referenced property copies remains opened

  prop.closeAll(true);

// close referenced property, but not the copies - transient propertiy remains open

  prop.resetTransientProperty();

// close transient property, but not the copies

  prop.close();

Implementation overview

Implementation details

  1. Close all property handles for the same cursor object
    Property  :: closeAll (  )

    In case of closing a transient reference, the referenced cursor object is destroyed. In order to destroy the transient reference property without destroying the referenced property, closeAll(false) should be called.

  2. to list
  3. Close all property handles for the same cursor object
    Property  :: closeAll ( bool bReferenced )

    In case of closing a transient reference property, the referenced cursor object will be deleted, too, when passing true in bReferenced (closeAll(true)). In this case, all property handles referring to the referenced cursor object become invalid.

    • bReferenced - - internal feature (not documented)
  4. to list