It's a pleasure to work with gtk and your invaluable and kind help.
On Sun, 14 May 2017 11:46:11 +0200, Mike Wey wrote:
On 05/13/2017 09:24 PM, Antonio Corbi wrote:
After upgrading one of my projects from gtkd-3.3.0 to gtkd-3.6.2 I'm getting some warnings after unreffing a Pixbuf:
(gtagui:10052): GLib-GObject-WARNING **: gobjectremovetoggleref: couldn't find toggle ref 0x8737f4(0x7ffff7f5ba40)
This kind of warnings are due to one line in my code like this:
`img = thePixmap.copy;
img.unref; // this is the line that produces such warnings.`
If I change it to:
The warning disappears and I get the desired behaviour (no memory eating).
Is this the appropiate way to make a pixmap free it's memory?
Both should do depending on the use case.
Destroy will always destroy the image data, while unref will only do
that when you/GtkD holds the last reference to the object.
The warning with unref is fixed in: