summaryrefslogtreecommitdiff
path: root/cpp/src/broker/Reference.cpp
diff options
context:
space:
mode:
authorAlan Conway <aconway@apache.org>2007-04-05 21:23:14 +0000
committerAlan Conway <aconway@apache.org>2007-04-05 21:23:14 +0000
commit70da584bd2e48bd56320f7ca1f6e94dfa430596d (patch)
tree2fdb00461a0e0e28fa72a549259eafb9e6203142 /cpp/src/broker/Reference.cpp
parentbb79efff2408de5f6cd66089cde8b8a82cc80cc2 (diff)
downloadqpid-python-70da584bd2e48bd56320f7ca1f6e94dfa430596d.tar.gz
* cpp/src/broker/BrokerMessageMessage.h: Change reference from weak_ptr to
shared_ptr. Broker messages hold their reference. * cpp/src/broker/Reference.cpp (close): clear messages array to break shared_ptr cycle and avoid a leak. * cpp/src/client/MessageMessageChannel.cpp (publish): Support references for large messages. * cpp/src/shared_ptr.h (make_shared_ptr): added deleter variant. * cpp/src/tests/ClientChannelTest.cpp: Enabled testGetNoContent, testGetFragmentedMessage git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@525964 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/broker/Reference.cpp')
-rw-r--r--cpp/src/broker/Reference.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/cpp/src/broker/Reference.cpp b/cpp/src/broker/Reference.cpp
index ef55d3e6a2..1ef2eb44d0 100644
--- a/cpp/src/broker/Reference.cpp
+++ b/cpp/src/broker/Reference.cpp
@@ -46,6 +46,7 @@ void Reference::append(AppendPtr ptr) {
}
void Reference::close() {
+ messages.clear();
registry->references.erase(getId());
}