[perl-Gtk2] Fix leaks in GtkCellLayout and GtkTreeSortable
- From: Florian Ragwitz <rafl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [perl-Gtk2] Fix leaks in GtkCellLayout and GtkTreeSortable
- Date: Tue, 7 Dec 2010 19:11:43 +0000 (UTC)
commit f85482717e956b77458ec4c93ddc19a324c64a27
Author: Florian Ragwitz <rafl debian org>
Date: Thu Nov 25 06:29:14 2010 +0100
Fix leaks in GtkCellLayout and GtkTreeSortable
xs/GtkCellLayout.xs | 2 ++
xs/GtkTreeSortable.xs | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/xs/GtkCellLayout.xs b/xs/GtkCellLayout.xs
index 9bae738..6df83f2 100644
--- a/xs/GtkCellLayout.xs
+++ b/xs/GtkCellLayout.xs
@@ -511,6 +511,8 @@ DESTROY (SV *code)
return;
wrapper = INT2PTR (Gtk2PerlCellLayoutDataFunc*, SvIV ((SV *) mg->mg_ptr));
+ SvREFCNT_dec ((SV *) mg->mg_ptr);
+
if (wrapper && wrapper->destroy)
wrapper->destroy (wrapper->data);
diff --git a/xs/GtkTreeSortable.xs b/xs/GtkTreeSortable.xs
index 1d377e6..92e2b57 100644
--- a/xs/GtkTreeSortable.xs
+++ b/xs/GtkTreeSortable.xs
@@ -454,6 +454,8 @@ DESTROY (code)
return;
stuff = INT2PTR (Gtk2PerlTreeIterCompareFunc*, SvIV ((SV *) mg->mg_ptr));
+ SvREFCNT_dec ((SV *) mg->mg_ptr);
+
if (stuff && stuff->destroy)
stuff->destroy (stuff->data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]