From b29458c36d7c6957d6e47582f9d74db1b625ec60 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Mon, 16 Jan 2012 21:28:46 +0000 Subject: QPID-3603: Fix QueueReplicator lifecycle, shared pointer cycle. git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-3603@1232171 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/qpid/ha/QueueReplicator.cpp | 5 +---- qpid/cpp/src/qpid/ha/QueueReplicator.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp index 05f303e2b9..27b521383e 100644 --- a/qpid/cpp/src/qpid/ha/QueueReplicator.cpp +++ b/qpid/cpp/src/qpid/ha/QueueReplicator.cpp @@ -62,9 +62,6 @@ QueueReplicator::QueueReplicator(boost::shared_ptr q, boost::shared_ptrgetBroker()->getLinks().declare( link->getHost(), link->getPort(), @@ -80,7 +77,7 @@ void QueueReplicator::activate() { 0, // sync? // Include shared_ptr to self to ensure we are not deleted // before initializeBridge is called. - boost::bind(&QueueReplicator::initializeBridge, this, _1, _2, self) + boost::bind(&QueueReplicator::initializeBridge, this, _1, _2, shared_from_this()) ); } diff --git a/qpid/cpp/src/qpid/ha/QueueReplicator.h b/qpid/cpp/src/qpid/ha/QueueReplicator.h index 4846d01b76..9de7dd480c 100644 --- a/qpid/cpp/src/qpid/ha/QueueReplicator.h +++ b/qpid/cpp/src/qpid/ha/QueueReplicator.h @@ -79,7 +79,6 @@ class QueueReplicator : public broker::Exchange, sys::Mutex lock; boost::shared_ptr queue; boost::shared_ptr link; - boost::shared_ptr self; }; }} // namespace qpid::ha -- cgit v1.2.1