Author: Sven Neumann Date: To: David Hodson CC: gimp-developer Subject: Re: [Gimp-developer] Image reference count problem in plugin
Hi,
I've just tried this with GIMP 2.2-pre2 from the Script-Fu console and
you are right that the reference handling is somewhat confusing.
Perhaps gimp_displays_reconnect() should hand the reference over to
the display just as gimp_display_new() does. That would however mean
that if you reconnected the display again your image would be gone
since the last reference on it just got dropped.
So I think the current behaviour is coorect but should perhaps be
documented better. Your plug-in will have to call gimp_image_delete()
on the new image in order to drop the reference it holds on it.
Here's the example you gave: