ekiga r7841 - trunk/lib/engine/framework
- From: jpuydt svn gnome org
- To: svn-commits-list gnome org
- Subject: ekiga r7841 - trunk/lib/engine/framework
- Date: Thu, 2 Apr 2009 20:27:25 +0000 (UTC)
Author: jpuydt
Date: Thu Apr 2 20:27:25 2009
New Revision: 7841
URL: http://svn.gnome.org/viewvc/ekiga?rev=7841&view=rev
Log:
Small memory management improvement for the runtime
Modified:
trunk/lib/engine/framework/runtime-glib.cpp
Modified: trunk/lib/engine/framework/runtime-glib.cpp
==============================================================================
--- trunk/lib/engine/framework/runtime-glib.cpp (original)
+++ trunk/lib/engine/framework/runtime-glib.cpp Thu Apr 2 20:27:25 2009
@@ -54,13 +54,19 @@
unsigned int seconds;
};
+static void
+free_message (struct message* msg)
+{
+ delete msg;
+}
+
static gboolean
run_later_or_back_in_main_helper (gpointer data)
{
struct message *msg = (struct message *)data;
msg->action ();
- delete msg;
+ free_message (msg);
return FALSE;
}
@@ -133,7 +139,8 @@
void
Ekiga::Runtime::init ()
{
- queue = g_async_queue_new (); // here we get a ref to the queue
+ // here we get a ref to the queue, which we'll release in quit
+ queue = g_async_queue_new_full ((GDestroyNotify)free_message);
struct source* source = (struct source *)g_source_new (&source_funcs,
sizeof (struct source));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]