summaryrefslogtreecommitdiff
path: root/cpp/src/shared_ptr.h
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/shared_ptr.h
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/shared_ptr.h')
-rw-r--r--cpp/src/shared_ptr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/cpp/src/shared_ptr.h b/cpp/src/shared_ptr.h
index df08c325df..eb5f3f906a 100644
--- a/cpp/src/shared_ptr.h
+++ b/cpp/src/shared_ptr.h
@@ -37,6 +37,11 @@ template <class T> shared_ptr<T> make_shared_ptr(T* ptr) {
return shared_ptr<T>(ptr);
}
+template <class T, class D>
+shared_ptr<T> make_shared_ptr(T* ptr, D deleter) {
+ return shared_ptr<T>(ptr, deleter);
+}
+
} // namespace qpid