Function Name: Free Object

Definition

Frees the memory directly associated with the specified object, if any, which was allocated by this API either

  1. during an earlier call to a function that retrieved an object, e.g., SE_GetNextObject(), SE_GetNthComponentOfGivenType(), or
  2. during an earlier call to a function that created an object, e.g. SE_CreateObject().

Note that if an object has been retrieved more than once, then SE_FreeObject() will not actually release the memory for that object until the last reference to the object is freed; i.e., you must call SE_FreeObject() for an object as many times as you have retrieved that object with an API function.

Returns

SE_SUCCESS - and the reference count for this object is decremented, if a valid parameter was passed in and all operations succeeded. Please note that
  1. the actual object is not freed until the reference count becomes zero, but
  2. this object handle is no longer valid, since any contextual information associated with it (e.g., inheritance context) is released.

SE_INVALID_OR_NULL_OBJECT - and nothing is changed, if to_free wasn't a handle to a valid, active (i.e., unfreed) object.

SE_FAILURE - and nothing is changed, if the API implementation specified does not provide this function in its shared library, and dynamic binding is specified at compile time.

Prototype


extern SE_STATUS_CODE_ENUM
SE_FreeObject
(
SE_OBJECT to_free (notes)
);

Parameters Notes

to_free

 the SEDRIS object to be freed.

Prev: Free Iterator. Next: Free Object ID. Up:Index.