activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Johnson <tjohn...@microaut.com>
Subject Closing connection properly in C++?
Date Wed, 27 Feb 2008 18:43:30 GMT

When I close the connection using the CMS C++ library, I get six IOExceptions
logged to the debug console of VS2005.   These don't seem to cause a
problem, but wondering if I'm forgetting to do something.  I am currently
doing it this way:

if (producer!=NULL) {
			delete producer;
			producer=NULL;
		}
		if (destination!=NULL) {
			delete destination;
			destination=NULL;
		}
		// close session and connection before deleting
		if (session!=NULL)
			session->close();
		if (connection!=NULL)
			connection->close();
		if (session!=NULL) {
			delete session;
			session=NULL;
		}
		if (connection!=NULL) {
			delete connection;
			connection=NULL;
		}
 
Am I forgetting to do anything?

-- 
View this message in context: http://www.nabble.com/Closing-connection-properly-in-C%2B%2B--tp15720035s2354p15720035.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message