Backport !153 to eog-43
Backport the refcount/leak fixes from !153 (merged)/#291 (closed) into the GNOME 43 branch.
Fixes #295 (closed).
Backport the refcount/leak fixes from !153 (merged)/#291 (closed) into the GNOME 43 branch.
Fixes #295 (closed).