From 574ccee478b9da9457cdf0e476b8df6eb584b580 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Jul 2012 06:48:11 +0000 Subject: Minor memory management, performance, and tracing improvements. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1361917 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/components/chat/xmpp.hpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'sca-cpp/trunk/components/chat/xmpp.hpp') diff --git a/sca-cpp/trunk/components/chat/xmpp.hpp b/sca-cpp/trunk/components/chat/xmpp.hpp index e5f423c270..aa006029fa 100644 --- a/sca-cpp/trunk/components/chat/xmpp.hpp +++ b/sca-cpp/trunk/components/chat/xmpp.hpp @@ -76,6 +76,20 @@ public: debug("chat::xmppclient::copy"); } + const XMPPClient& operator=(const XMPPClient& xc) { + debug("chat::xmppclient::operator="); + if(this == &xc) + return *this; + owner = false; + ctx = xc.ctx; + conn = xc.conn; + listener = xc.listener; + connecting = xc.connecting; + connected = xc.connected; + disconnecting = xc.disconnecting; + return *this; + } + ~XMPPClient() { debug("chat::~xmppclient"); extern const failable disconnect(XMPPClient& xc); @@ -98,7 +112,7 @@ private: friend const failable disconnect(XMPPClient& xc); friend const failable listen(const lambda(const value&, const value&, XMPPClient&)>& listener, XMPPClient& xc); - const bool owner; + bool owner; xmpp_ctx_t* ctx; xmpp_conn_t* conn; lambda(const value&, const value&, XMPPClient&)> listener; -- cgit v1.2.3