summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2008-09-22 02:05:03 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2008-09-22 02:05:03 +0000
commitea8215ec820066b044c61b430c1b28526a42ddbc (patch)
treeb44c83699d32df0b6d70b7c969af2253f4d98a96 /src
parentreleasing fails to delete document, even when memory is scarce, so delete it ... (diff)
downloadinkscape-ea8215ec820066b044c61b430c1b28526a42ddbc.tar.gz
inkscape-ea8215ec820066b044c61b430c1b28526a42ddbc.zip
hide item instead of unreffing, and unref arena to prevent memory leak
(bzr r6868)
Diffstat (limited to 'src')
-rw-r--r--src/helper/pixbuf-ops.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp
index 25e4920b9..ee5f72161 100644
--- a/src/helper/pixbuf-ops.cpp
+++ b/src/helper/pixbuf-ops.cpp
@@ -84,6 +84,7 @@ sp_export_jpg_file(SPDocument *doc, gchar const *filename,
g_snprintf(c, 32, "%f", quality);
gboolean saved = gdk_pixbuf_save (pixbuf, filename, "jpeg", NULL, "quality", c, NULL);
g_free(c);
+ gdk_pixbuf_unref (pixbuf);
if (saved) return true;
else return false;
}
@@ -106,7 +107,6 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
Geom::Rect screen=Geom::Rect(Geom::Point(x0,y0), Geom::Point(x1, y1));
- double zoom_scale = 1.0;
double padding = 1.0;
Geom::Point origin(screen.min()[Geom::X],
@@ -169,7 +169,8 @@ sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename*/,
(GdkPixbufDestroyNotify)g_free,
NULL);
- nr_arena_item_unref(root);
+ sp_item_invoke_hide (SP_ITEM(sp_document_root(doc)), dkey);
+ nr_object_unref((NRObject *) arena);
// gdk_pixbuf_save (pixbuf, "C:\\temp\\internal.jpg", "jpeg", NULL, "quality","100", NULL);