diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-09 03:39:08 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2011-01-09 03:39:08 +0000 |
commit | 2e9c610931b4e0a6bab25b1fe5dbd0def45ee126 (patch) | |
tree | 1c740e32afcfc6570b5e87d179c12854ea4f686c /sca-cpp/trunk/components/queue/qpid.hpp | |
parent | d2a4018d6c354a75e45800f90f45d09469bc4db5 (diff) |
Fix memory leak in Python runtime integration. Reduce memory consumption of debug trace functions. Add trace points to help track the lifecycle of some of the runtime context objects.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1056880 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/components/queue/qpid.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sca-cpp/trunk/components/queue/qpid.hpp b/sca-cpp/trunk/components/queue/qpid.hpp index 2651e3a433..4fb4c7a1bd 100644 --- a/sca-cpp/trunk/components/queue/qpid.hpp +++ b/sca-cpp/trunk/components/queue/qpid.hpp @@ -52,17 +52,21 @@ namespace queue { class QpidConnection { public: QpidConnection() : owner(true) { + debug("queue::qpidonnection"); c.open("localhost", 5672); } QpidConnection(const bool owner) : owner(owner) { + debug("queue::qpidonnection"); c.open("localhost", 5672); } QpidConnection(const QpidConnection& qc) : owner(false), c(qc.c) { + debug("queue::qpidonnection::copy"); } ~QpidConnection() { + debug("queue::~qpidonnection"); if (!owner) return; c.close(); @@ -91,15 +95,19 @@ const failable<bool> close(QpidConnection& qc) { class QpidSession { public: QpidSession(QpidConnection& qc) : owner(true), s(qc.c.newSession()) { + debug("queue::qpidsession"); } QpidSession(QpidConnection& qc, const bool owner) : owner(owner), s(qc.c.newSession()) { + debug("queue::qpidsession"); } QpidSession(const QpidSession& qs) : owner(false), s(qs.s) { + debug("queue::qpidsession::copy"); } ~QpidSession() { + debug("queue::~qpidsession"); if (!owner) return; s.close(); |