Created attachment 3820 Patch fixing the described memory-leak. The reference to the input-stream is not removed. As such, ristretto does not free up the used memory there. Also, the gdkanimationiter is not free-ed.
The added patch also fixes a problem with the 'iter-changed' signal, which prevents the PictureViewer unloading the last closed image.
Committed to master