To create a new object, and get the handle to that object, call the
mqeObjectName_new(...) function. To
release the resource associated with a handle, call the
mqeObjectName_free(...) function.
When creating and freeing handles, the following rules should be
observed:
- If a new() call fails, the handle does not need to be
freed.
- Handles should not be freed more than once - doing so results in
unpredictable behavior.
- You can free a NULL value and this does not cause an
error.
- To check if a handle is NULL or represents a NULL object then use the
IS_NULL(pObjectHndl). This takes a pointer to an object
handle and returns MQE_TRUE if it is NULL or represents
NULL. Otherwise it return MQE_FALSE.
Note that for Administration messages, each message has its own unique
new() function, but there is only one free function,
mqeAdminMsg_free.
© IBM Corporation 2000, 2003. All Rights Reserved