ekiga r7319 - in trunk: . lib/engine/protocol/skel
- From: dsandras svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7319 - in trunk: . lib/engine/protocol/skel
- Date: Sun, 9 Nov 2008 18:47:14 +0000 (UTC)
Author: dsandras
Date: Sun Nov 9 18:47:14 2008
New Revision: 7319
URL: http://svn.gnome.org/viewvc/ekiga?rev=7319&view=rev
Log:
Added comment for callcore destruction to monitor it. Disconnect signals
relaed to the CallManager in order to allow destruction of gmref_ptr
services.
Modified:
trunk/ChangeLog
trunk/lib/engine/protocol/skel/call-core.cpp
trunk/lib/engine/protocol/skel/call-core.h
Modified: trunk/lib/engine/protocol/skel/call-core.cpp
==============================================================================
--- trunk/lib/engine/protocol/skel/call-core.cpp (original)
+++ trunk/lib/engine/protocol/skel/call-core.cpp Sun Nov 9 18:47:14 2008
@@ -46,12 +46,19 @@
using namespace Ekiga;
+CallCore::~CallCore ()
+{
+ std::cout << "Deleting callcore" << std::endl << std::flush;
+ manager_connections.clear ();
+}
+
+
void CallCore::add_manager (gmref_ptr<CallManager> manager)
{
managers.insert (manager);
manager_added.emit (manager);
- manager->ready.connect (sigc::bind (sigc::mem_fun (this, &CallCore::on_manager_ready), manager));
+ manager_connections.push_back (manager->ready.connect (sigc::bind (sigc::mem_fun (this, &CallCore::on_manager_ready), manager)));
}
@@ -109,18 +116,18 @@
conns.push_back (call->stream_resumed.connect (sigc::bind (sigc::mem_fun (this, &CallCore::on_stream_resumed), call, manager)));
conns.push_back (call->removed.connect (sigc::bind (sigc::mem_fun (this, &CallCore::on_call_removed), call)));
- calls[call->get_id ()] = conns;
+ call_connections [call->get_id ()] = conns;
}
void CallCore::remove_call (gmref_ptr<Call> call)
{
- for (std::list<sigc::connection>::iterator iter2 = calls [call->get_id ()].begin ();
- iter2 != calls [call->get_id ()].end ();
+ for (std::list<sigc::connection>::iterator iter2 = call_connections [call->get_id ()].begin ();
+ iter2 != call_connections [call->get_id ()].end ();
++iter2)
iter2->disconnect ();
- calls.erase (call->get_id ());
+ call_connections.erase (call->get_id ());
}
Modified: trunk/lib/engine/protocol/skel/call-core.h
==============================================================================
--- trunk/lib/engine/protocol/skel/call-core.h (original)
+++ trunk/lib/engine/protocol/skel/call-core.h Sun Nov 9 18:47:14 2008
@@ -75,7 +75,7 @@
/** The destructor
*/
- ~CallCore () { }
+ ~CallCore ();
/*** Service Implementation ***/
@@ -185,7 +185,8 @@
std::set<gmref_ptr<CallManager> > managers;
- std::map<std::string, std::list<sigc::connection> > calls;
+ std::list<sigc::connection> manager_connections;
+ std::map<std::string, std::list<sigc::connection> > call_connections;
unsigned nr_ready;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]