Bug fix #626: Animated GIFS lead to high CPU load
authorColin Clark <colin.clark@cclark.uk>
Tue, 6 Aug 2019 11:49:55 +0000 (12:49 +0100)
committerKlaus Ethgen <Klaus@Ethgen.de>
Tue, 20 Aug 2019 18:34:01 +0000 (19:34 +0100)
https://github.com/BestImageViewer/geeqie/issues/626

Cure a memory leak.
A less significant memory leak remains.

src/layout_image.c

index a52e6ce..4b46c0f 100644 (file)
@@ -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;