summaryrefslogtreecommitdiff
path: root/qpid/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
commitf90f46c05b12e9e38bff1ac8418add1b3fa074d8 (patch)
tree675415764c64cb485d2c9eac93d4ad5639a6bc44 /qpid/cpp/src/shared_ptr.h
parent6b5c686b366846b7ecb0bb298c41fe474e1fb3c8 (diff)
downloadqpid-python-f90f46c05b12e9e38bff1ac8418add1b3fa074d8.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@525964 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/shared_ptr.h')
-rw-r--r--qpid/cpp/src/shared_ptr.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/qpid/cpp/src/shared_ptr.h b/qpid/cpp/src/shared_ptr.h
index df08c325df..eb5f3f906a 100644
--- a/qpid/cpp/src/shared_ptr.h
+++ b/qpid/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