* Fixed a memory leak

git-svn-id: http://dev.openwengo.org/svn/openwengo/wengophone-ng/branches/wengophone-dbus-api/libs/dbus@12143 30a43799-04e7-0310-8b2b-ea0d24f86d0e
This commit is contained in:
pdurante 2007-07-31 19:27:10 +00:00
parent 7c420f87cd
commit e47288d689
3 changed files with 4 additions and 4 deletions

View file

@ -164,7 +164,7 @@ public:
struct Private; struct Private;
Message( Private* ); Message( Private*, bool incref = true );
Message( const Message& m ); Message( const Message& m );

View file

@ -350,7 +350,7 @@ Message Connection::send_blocking( Message& msg, int timeout )
if(e) throw Error(e); if(e) throw Error(e);
return Message(new Message::Private(reply)); return Message(new Message::Private(reply), false);
} }
PendingCall Connection::send_async( Message& msg, int timeout ) PendingCall Connection::send_async( Message& msg, int timeout )

View file

@ -365,10 +365,10 @@ Message::Message()
{ {
} }
Message::Message( Message::Private* p ) Message::Message( Message::Private* p, bool incref )
: _pvt(p) : _pvt(p)
{ {
if(_pvt->msg) dbus_message_ref(_pvt->msg); if(_pvt->msg && incref) dbus_message_ref(_pvt->msg);
} }
Message::Message( const Message& m ) Message::Message( const Message& m )