Of course, you can both work around this until your distro gets the new
version of glibmm, by manually adding a the_refptr->reference() before it
gets destroyed. If your source might be build on arbitrary machines, then
this workaround could be made conditional on the glibmm version using a
macro.

(Obviously you can't use an unnamed temporary for this, but in reality that
was just for a concise bug replication; there would be no reason to not
assign the return value to a variable in real code.)

Be sure to prevent the extra ->reference() being compiled on systems that
have the fix (whether it's your own after an upgrade, or end-users
compiling your program), otherwise it will of course cause memory leaks as
the refcount will be 1 too high under fixed glibmm.
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to