summaryrefslogtreecommitdiff
path: root/cpp/lib/broker/BrokerQueue.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-03-29 22:30:48 +0000
committerAlan Conway <aconway@apache.org>2007-03-29 22:30:48 +0000
commit1a23d52070195a9c8de98dd4af6e19f42051f1a5 (patch)
treea7515a61e0a46defc4ef84bea52424c38bdbba0c /cpp/lib/broker/BrokerQueue.cpp
parent45d083f70618d21ae9d138cf0c3d8e44c84f4f93 (diff)
downloadqpid-python-1a23d52070195a9c8de98dd4af6e19f42051f1a5.tar.gz
Fixed memory leak: removed Binding and ExchangeBinding.
These classes unbind a deleted queue from any Exchanges. But Exchanges hold shared_ptr<Queue>, 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
Diffstat (limited to 'cpp/lib/broker/BrokerQueue.cpp')
-rw-r--r--cpp/lib/broker/BrokerQueue.cpp11
1 files changed, 1 insertions, 10 deletions
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);