From 75eaf0862c0b3adc8a35875c466089091d515210 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 3 Oct 2007 19:57:56 +0000 Subject: [PATCH] Prevent a warning from Gtk about ownership of floating reference. The code's still not right, and will be leaking a little (when new dialogs are opened), but I'm sure there are much bigger leaks elsewhere. git-svn-id: http://svn.voria.com/code@831 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/dockdialog.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/synfig-studio/trunk/src/gtkmm/dockdialog.cpp b/synfig-studio/trunk/src/gtkmm/dockdialog.cpp index 312dfa4..31bc9a3 100644 --- a/synfig-studio/trunk/src/gtkmm/dockdialog.cpp +++ b/synfig-studio/trunk/src/gtkmm/dockdialog.cpp @@ -149,7 +149,7 @@ DockDialog::~DockDialog() { dock_book_list.front()->clear(); - // UGLY HACK + //! \fixme: UGLY HACK // The following line really should be uncommented, // but it causes crashes. Without it, a small // memory hole is created--but at least it doesn't crash @@ -158,8 +158,14 @@ DockDialog::~DockDialog() // Oddly enough, the following line should // theoreticly do the same thing after this // class is destroyed, but it doesn't seem to - // caues a crash. - manage(dock_book_list.front()); + // cause a crash. It does, however, trigger this warning: + // + // A floating object was finalized. This means that someone + // called g_object_unref() on an object that had only a + // floating reference; the initial floating reference is not + // owned by anyone and must be removed with g_object_ref_sink(). + // + // manage(dock_book_list.front()); } // Remove us from the dock manager -- 2.7.4