You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2012/10/04 00:23:32 UTC
svn commit: r1393799 - in
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels:
ActiveMQConsumerKernel.cpp ActiveMQProducerKernel.cpp
ActiveMQSessionKernel.cpp
Author: tabish
Date: Wed Oct 3 22:23:32 2012
New Revision: 1393799
URL: http://svn.apache.org/viewvc?rev=1393799&view=rev
Log:
Polish up some of the code a bit, better destructor impls.
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp?rev=1393799&r1=1393798&r2=1393799&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp Wed Oct 3 22:23:32 2012
@@ -390,15 +390,14 @@ ActiveMQConsumerKernel::ActiveMQConsumer
ActiveMQConsumerKernel::~ActiveMQConsumerKernel() {
try {
+ this->close();
+ }
+ AMQ_CATCHALL_NOTHROW()
- try {
- this->close();
- } catch(...) {}
-
+ try {
delete this->internal;
}
- AMQ_CATCH_NOTHROW( ActiveMQException )
- AMQ_CATCHALL_NOTHROW( )
+ AMQ_CATCHALL_NOTHROW()
}
////////////////////////////////////////////////////////////////////////////////
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp?rev=1393799&r1=1393798&r2=1393799&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQProducerKernel.cpp Wed Oct 3 22:23:32 2012
@@ -89,14 +89,13 @@ ActiveMQProducerKernel::~ActiveMQProduce
try {
close();
}
- AMQ_CATCH_NOTHROW( ActiveMQException )
- AMQ_CATCHALL_NOTHROW( )
+ AMQ_CATCHALL_NOTHROW()
}
////////////////////////////////////////////////////////////////////////////////
void ActiveMQProducerKernel::close() {
- try{
+ try {
if (!this->isClosed()) {
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp?rev=1393799&r1=1393798&r2=1393799&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/core/kernels/ActiveMQSessionKernel.cpp Wed Oct 3 22:23:32 2012
@@ -235,13 +235,14 @@ ActiveMQSessionKernel::ActiveMQSessionKe
////////////////////////////////////////////////////////////////////////////////
ActiveMQSessionKernel::~ActiveMQSessionKernel() {
try {
- // Destroy this session's resources
close();
}
- AMQ_CATCH_NOTHROW( ActiveMQException )
- AMQ_CATCHALL_NOTHROW( )
+ AMQ_CATCHALL_NOTHROW()
- delete this->config;
+ try {
+ delete this->config;
+ }
+ AMQ_CATCHALL_NOTHROW()
}
////////////////////////////////////////////////////////////////////////////////