From: Colin Clark Date: Tue, 6 Aug 2019 11:49:55 +0000 (+0100) Subject: Bug fix #626: Animated GIFS lead to high CPU load X-Git-Tag: v1.5.1~2 X-Git-Url: http://geeqie.org/cgi-bin/gitweb.cgi?p=geeqie.git;a=commitdiff_plain;h=18afee58f0d7d576959a127cd42a466fce5290b3 Bug fix #626: Animated GIFS lead to high CPU load https://github.com/BestImageViewer/geeqie/issues/626 Cure a memory leak. A less significant memory leak remains. --- diff --git a/src/layout_image.c b/src/layout_image.c index a52e6cea..4b46c0fc 100644 --- a/src/layout_image.c +++ b/src/layout_image.c @@ -398,6 +398,8 @@ static void animation_async_ready_cb(GObject *source_object, GAsyncResult *res, if (animation->iter = gdk_pixbuf_animation_get_iter(animation->gpa,NULL)) { animation->iter = gdk_pixbuf_animation_get_iter(animation->gpa, NULL); + // FIXME: the reference count is being incremented here. Reason unknown. + g_object_unref(animation->gpa); animation->data_adr = animation->lw->image->image_fd; animation->delay = gdk_pixbuf_animation_iter_get_delay_time(animation->iter); animation->valid = TRUE;