Re: Gtk::Application::get_default segfault on exit
- From: Daniel Boles <dboles src gmail com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: Gtk::Application::get_default segfault on exit
- Date: Wed, 21 Jun 2017 20:34:49 +0100
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]