ekiga r7342 - trunk/lib/engine/framework
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7342 - trunk/lib/engine/framework
- Date: Fri, 14 Nov 2008 19:43:46 +0000 (UTC)
Author: jpuydt
Date: Fri Nov 14 19:43:46 2008
New Revision: 7342
URL: http://svn.gnome.org/viewvc/ekiga?rev=7342&view=rev
Log:
Stopped leaking by adding a proper destructor to Ekiga::RefLister (!!!)
Modified:
trunk/lib/engine/framework/reflister.h
Modified: trunk/lib/engine/framework/reflister.h
==============================================================================
--- trunk/lib/engine/framework/reflister.h (original)
+++ trunk/lib/engine/framework/reflister.h Fri Nov 14 19:43:46 2008
@@ -53,6 +53,8 @@
typedef std::map<gmref_ptr<ObjectType>,std::list<sigc::connection> > container_type;
typedef Ekiga::map_key_iterator<container_type> iterator;
+ virtual ~RefLister ();
+
void visit_objects (sigc::slot<bool, gmref_ptr<ObjectType> > visitor);
void add_object (gmref_ptr<ObjectType> obj);
@@ -78,6 +80,12 @@
};
template<typename ObjectType>
+Ekiga::RefLister<ObjectType>::~RefLister ()
+{
+ remove_all_objects ();
+}
+
+template<typename ObjectType>
void
Ekiga::RefLister<ObjectType>::visit_objects (sigc::slot<bool, gmref_ptr<ObjectType> > visitor)
{
@@ -104,7 +112,7 @@
template<typename ObjectType>
void
Ekiga::RefLister<ObjectType>::add_connection (gmref_ptr<ObjectType> obj,
- sigc::connection connection)
+ sigc::connection connection)
{
objects[obj].push_back (connection);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]