[perl-Gtk2/stable-1-22] Correct the memory management in Gtk2::Gdk::Window->new



commit 062b0ec5d6bfb6531989bae482ed2e769d8f2acc
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Tue Nov 23 21:20:32 2010 +0100

    Correct the memory management in Gtk2::Gdk::Window->new
    
    We don't own the returned window and so we have to take a ref.  Reported
    by Quentin Sculo and Kevin Ryde.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=616655

 xs/GdkWindow.xs |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/xs/GdkWindow.xs b/xs/GdkWindow.xs
index b3eaad5..46a3c7c 100644
--- a/xs/GdkWindow.xs
+++ b/xs/GdkWindow.xs
@@ -177,7 +177,8 @@ are a bit odd, but that's what Gtk has.  You can, as for any enum,
 give the full names like "GDK_INPUT_OUTPUT" if desired, for some
 clarity.
 =cut
-GdkWindow_noinc *
+# Note: no _noinc here, as we dot own the returned window.
+GdkWindow *
 gdk_window_new (class, parent, attributes_ref)
 	GdkWindow_ornull *parent
 	SV *attributes_ref



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]