[gimp] plug-ins: any GIMP image must be deleted when animation-play exits.
- From: Jehan Pagès <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: any GIMP image must be deleted when animation-play exits.
- Date: Sat, 31 Aug 2013 04:13:24 +0000 (UTC)
commit 1bd183c54c31cabcc0ab65988b5b098d30da7cd2
Author: Jehan <jehan girinstud io>
Date: Sat Aug 31 15:55:23 2013 +1200
plug-ins: any GIMP image must be deleted when animation-play exits.
Other allocated data is allright because it is freed when the process
exits, but not GEGL buffers created with gimp_image_new(), because they
are managed by the main GIMP process. Otherwise the plugin would leak
GeglBuffers each time it is closed.
plug-ins/common/animation-play.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/common/animation-play.c b/plug-ins/common/animation-play.c
index 6bdd4d7..d31e970 100644
--- a/plug-ins/common/animation-play.c
+++ b/plug-ins/common/animation-play.c
@@ -195,6 +195,8 @@ static AnimationSettings settings =
100 /* ms */
};
+static gint32 frames_image_id = 0;
+
MAIN ()
static void
@@ -263,6 +265,9 @@ run (const gchar *name,
values[0].type = GIMP_PDB_STATUS;
values[0].data.d_status = status;
+
+ gimp_image_delete (frames_image_id);
+ gegl_exit ();
}
static void
@@ -994,7 +999,6 @@ static void
init_frames (void)
{
/* Frames are associated to an unused image. */
- static gint32 frames_image_id;
gint i;
gint32 new_frame, previous_frame, new_layer;
gboolean animated;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]