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/log/scribe.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sca-cpp/trunk/components/log/scribe.hpp') diff --git a/sca-cpp/trunk/components/log/scribe.hpp b/sca-cpp/trunk/components/log/scribe.hpp index 5ae8a50776..0f0570be64 100644 --- a/sca-cpp/trunk/components/log/scribe.hpp +++ b/sca-cpp/trunk/components/log/scribe.hpp @@ -66,7 +66,6 @@ namespace scribe { class Scribe { public: Scribe() : owner(false) { - debug("scribe::scribe"); } Scribe(const string host, const int port) : owner(true) { @@ -80,9 +79,18 @@ public: client = c.client; transport = c.transport; } + + const Scribe& operator=(const Scribe& c) { + debug("scribe::scribe::operator="); + if(this == &c) + return *this; + owner = false; + client = c.client; + transport = c.transport; + return *this; + } ~Scribe() { - debug("scribe::~scribe"); if (!owner) return; try { -- cgit v1.2.3