diff options
| author | Alan Conway <aconway@apache.org> | 2007-03-29 22:30:48 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2007-03-29 22:30:48 +0000 |
| commit | 08aa59a733f770e6505ce861d717170aaa343329 (patch) | |
| tree | 71638c30b5ea05b86146eed0b90c87c13f4a9135 /qpid/cpp/lib/broker/BrokerQueue.cpp | |
| parent | d231d58dc13bece684d1b162462f5e9d68ce9a60 (diff) | |
| download | qpid-python-08aa59a733f770e6505ce861d717170aaa343329.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@523857 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/lib/broker/BrokerQueue.cpp')
| -rw-r--r-- | qpid/cpp/lib/broker/BrokerQueue.cpp | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/qpid/cpp/lib/broker/BrokerQueue.cpp b/qpid/cpp/lib/broker/BrokerQueue.cpp index b65e8e3a9a..4b0ed6111c 100644 --- a/qpid/cpp/lib/broker/BrokerQueue.cpp +++ b/qpid/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); |
