From 1a23d52070195a9c8de98dd4af6e19f42051f1a5 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Thu, 29 Mar 2007 22:30:48 +0000 Subject: Fixed memory leak: removed Binding and ExchangeBinding. These classes unbind a deleted queue from any Exchanges. But Exchanges hold shared_ptr, so queues never deleted while the exchange exists. Moreover queue-binding form a shared_ptr cycle causing a leak. Raised QPID-438 for the remaining problem: destroyed queues are never unbound or deleted git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@523857 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/lib/broker/BrokerQueue.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'cpp/lib/broker/BrokerQueue.cpp') diff --git a/cpp/lib/broker/BrokerQueue.cpp b/cpp/lib/broker/BrokerQueue.cpp index b65e8e3a9a..4b0ed6111c 100644 --- a/cpp/lib/broker/BrokerQueue.cpp +++ b/cpp/lib/broker/BrokerQueue.cpp @@ -50,16 +50,7 @@ Queue::Queue(const string& _name, uint32_t _autodelete, if(autodelete) lastUsed = now()/TIME_MSEC; } -Queue::~Queue(){ - for(Binding* b = bindings.front(); !bindings.empty(); b = bindings.front()){ - b->cancel(); - bindings.pop(); - } -} - -void Queue::bound(Binding* b){ - bindings.push(b); -} +Queue::~Queue(){} void Queue::deliver(Message::shared_ptr& msg){ enqueue(0, msg, 0); -- cgit v1.2.1