summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/Message.cpp
diff options
context:
space:
mode:
authorGordon Sim <gsim@apache.org>2006-11-30 14:48:24 +0000
committerGordon Sim <gsim@apache.org>2006-11-30 14:48:24 +0000
commit505b253590d2cf8ebfe35ccd2ff3df2443240001 (patch)
tree08896f180af647019b83d8157f578a276a9e9136 /cpp/src/qpid/broker/Message.cpp
parent4d7f04636758d39a3ef7250cbcc745edb3de7685 (diff)
downloadqpid-python-505b253590d2cf8ebfe35ccd2ff3df2443240001.tar.gz
Some further tweaks to MessageStore interface.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@480946 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/broker/Message.cpp')
-rw-r--r--cpp/src/qpid/broker/Message.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/Message.cpp b/cpp/src/qpid/broker/Message.cpp
index 64e66c4a30..6478383cb2 100644
--- a/cpp/src/qpid/broker/Message.cpp
+++ b/cpp/src/qpid/broker/Message.cpp
@@ -201,7 +201,11 @@ void Message::releaseContent(MessageStore* store)
{
if (!content.get() || content->size() > 0) {
//set content to lazy loading mode (but only if there is stored content):
- content = std::auto_ptr<Content>(new LazyLoadedContent(store, getPersistenceId(), expectedContentSize()));
+
+ //Note: the LazyLoadedContent instance contains a raw pointer to the message, however it is
+ // then set as a member of that message so its lifetime is guaranteed to be no longer than
+ // that of the message itself
+ content = std::auto_ptr<Content>(new LazyLoadedContent(store, this, expectedContentSize()));
}
}