WebSphere Message Service Client for C/C++, Version 2.0.2 Operating Systems: AIX, Linux, Solaris, Windows

Object Deletion

When an application deletes an XMS object that it has created, XMS releases the internal resources that have been allocated to the object.

When an application creates an XMS object, XMS allocates memory and other internal resources to the object. XMS retains these internal resources until the application explicitly deletes the object by calling the object's close or delete method, at which point XMS releases the internal resources. In a C++ application, an object is also deleted when it goes out of scope. If an application tries to delete an object that is already deleted, the call is ignored.

When an application deletes a Connection or Session object, XMS deletes certain associated objects automatically and releases their internal resources. These are objects that were created by the Connection or Session object and have no function independent from the object. These objects are shown in Table 1. Note that, if an application closes a connection with dependent sessions, all objects dependent on those sessions are also deleted. Only a Connection or Session object can have dependent objects.

Table 1. Objects that are deleted automatically
Deleted object Method Dependent objects that are deleted automatically
Connection Close Connection ConnectionMetaData and Session objects
Session Close Session MessageConsumer, MessageProducer, QueueBrowser, and Requestor objects

Concept topic

Terms of Use | Rate this page

Last updated: 24 May 2011

(C) Copyright IBM Corporation 2005, 2011. All Rights Reserved.