[ekiga] Broke the ext window finalize into dispose&finalize
- From: Julien Puydt <jpuydt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ekiga] Broke the ext window finalize into dispose&finalize
- Date: Mon, 21 Jan 2013 10:18:50 +0000 (UTC)
commit 295e08604d4b2fd993a92cacd24c5a63db1c815b
Author: Julien Puydt <jpuydt free fr>
Date: Mon Jan 21 10:37:07 2013 +0100
Broke the ext window finalize into dispose&finalize
Dispose is to break reference circles and might be called several times,
while finalize is to free memory.
lib/engine/gui/gtk-frontend/ext-window.cpp | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/lib/engine/gui/gtk-frontend/ext-window.cpp b/lib/engine/gui/gtk-frontend/ext-window.cpp
index e19e5ff..4225aba 100644
--- a/lib/engine/gui/gtk-frontend/ext-window.cpp
+++ b/lib/engine/gui/gtk-frontend/ext-window.cpp
@@ -146,7 +146,7 @@ constructor (GType type, guint n_properties, GObjectConstructParam *params)
}
static void
-finalize (GObject* gobject)
+dispose (GObject* gobject)
{
EkigaExtWindow *ew = EKIGA_EXT_WINDOW (gobject);
@@ -159,6 +159,14 @@ finalize (GObject* gobject)
clear_display_info (ew);
+ G_OBJECT_CLASS (ekiga_ext_window_parent_class)->dispose (gobject);
+}
+
+static void
+finalize (GObject* gobject)
+{
+ EkigaExtWindow *ew = EKIGA_EXT_WINDOW (gobject);
+
delete ew->priv;
ew->priv = NULL;
@@ -235,6 +243,7 @@ ekiga_ext_window_class_init (EkigaExtWindowClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->constructor = constructor;
+ object_class->dispose = dispose;
object_class->finalize = finalize;
widget_class->show = show;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]