From 68c4615c9f0c37d3debfdace0c2169103cf9287d Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Fri, 28 Sep 2007 17:53:16 +0000 Subject: Ensure no danbling pointers in client API: - Session -shared_ptr-> SessionCore -shared_ptr-> ConnectionImpl - Connection -shared_ptr-> ConnectionImpl - ConnectionImpl -weak_ptr-> SessionCore git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@580440 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/qpid/client/Connection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/src/qpid/client/Connection.cpp') diff --git a/cpp/src/qpid/client/Connection.cpp b/cpp/src/qpid/client/Connection.cpp index 2d8cbb2ddb..0a6a88ae90 100644 --- a/cpp/src/qpid/client/Connection.cpp +++ b/cpp/src/qpid/client/Connection.cpp @@ -72,7 +72,7 @@ void Connection::openChannel(Channel& channel) { Session Connection::newSession(uint32_t detachedLifetime) { shared_ptr core( - new SessionCore(*impl, ++channelIdCounter, max_frame_size)); + new SessionCore(impl, ++channelIdCounter, max_frame_size)); impl->addSession(core); core->open(detachedLifetime); return Session(core); @@ -82,7 +82,7 @@ void Connection::resume(Session& session) { shared_ptr core=session.impl; core->setChannel(++channelIdCounter); impl->addSession(core); - core->resume(*impl); + core->resume(impl); } void Connection::close() { -- cgit v1.2.1