From 3003d2edc4d6af95f0aaae1f93b9b6d66779eb47 Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Fri, 10 Jun 2005 19:53:47 +0000 Subject: [PATCH] Destroy the cairo surface when done with it. Plugs a fairly large leak in 2005-06-10 Kjartan Maraas * gdk/gdkcairo.c: (gdk_cairo_set_source_pixbuf): Destroy the cairo surface when done with it. Plugs a fairly large leak in some cases. ==6014== 1999824 (115640 direct, 1884184 indirect) bytes in 826 blocks are definitely lost in loss record 25239 of 25250 Like this from nautilus. --- ChangeLog | 9 +++++++++ ChangeLog.pre-2-10 | 9 +++++++++ ChangeLog.pre-2-8 | 9 +++++++++ gdk/gdkcairo.c | 1 + 4 files changed, 28 insertions(+) diff --git a/ChangeLog b/ChangeLog index f65ea02c01..bb100beb0b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2005-06-10 Kjartan Maraas + + * gdk/gdkcairo.c: (gdk_cairo_set_source_pixbuf): Destroy the + cairo surface when done with it. Plugs a fairly large leak in + some cases. + ==6014== 1999824 (115640 direct, 1884184 indirect) bytes in + 826 blocks are definitely lost in loss record 25239 of 25250 + Like this from nautilus. + 2005-06-10 Michael Natterer * gtk/gtk.symbols diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f65ea02c01..bb100beb0b 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,12 @@ +2005-06-10 Kjartan Maraas + + * gdk/gdkcairo.c: (gdk_cairo_set_source_pixbuf): Destroy the + cairo surface when done with it. Plugs a fairly large leak in + some cases. + ==6014== 1999824 (115640 direct, 1884184 indirect) bytes in + 826 blocks are definitely lost in loss record 25239 of 25250 + Like this from nautilus. + 2005-06-10 Michael Natterer * gtk/gtk.symbols diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f65ea02c01..bb100beb0b 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,12 @@ +2005-06-10 Kjartan Maraas + + * gdk/gdkcairo.c: (gdk_cairo_set_source_pixbuf): Destroy the + cairo surface when done with it. Plugs a fairly large leak in + some cases. + ==6014== 1999824 (115640 direct, 1884184 indirect) bytes in + 826 blocks are definitely lost in loss record 25239 of 25250 + Like this from nautilus. + 2005-06-10 Michael Natterer * gtk/gtk.symbols diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index 4e498546fa..267fd1676d 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -215,6 +215,7 @@ gdk_cairo_set_source_pixbuf (cairo_t *cr, } cairo_set_source_surface (cr, surface, pixbuf_x, pixbuf_y); + cairo_surface_destroy (surface); } #define __GDK_CAIRO_C__