From 08aa59a733f770e6505ce861d717170aaa343329 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@523857 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/lib/broker/TopicExchange.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'qpid/cpp/lib/broker/TopicExchange.cpp') diff --git a/qpid/cpp/lib/broker/TopicExchange.cpp b/qpid/cpp/lib/broker/TopicExchange.cpp index 3ebb3c8c56..796d3cea02 100644 --- a/qpid/cpp/lib/broker/TopicExchange.cpp +++ b/qpid/cpp/lib/broker/TopicExchange.cpp @@ -19,7 +19,6 @@ * */ #include -#include #include using namespace qpid::broker; @@ -118,11 +117,10 @@ bool TopicPattern::match(const Tokens& target) const TopicExchange::TopicExchange(const string& _name) : Exchange(_name) { } -void TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* args){ +void TopicExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* /*args*/){ Monitor::ScopedLock l(lock); TopicPattern routingPattern(routingKey); bindings[routingPattern].push_back(queue); - queue->bound(new ExchangeBinding(this, queue, routingKey, args)); } void TopicExchange::unbind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* /*args*/){ -- cgit v1.2.1