After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730383 - GtkApplication: Fix two muxer-related memory leaks
GtkApplication: Fix two muxer-related memory leaks
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkApplication
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-05-19 15:11 UTC by Kalev Lember
Modified: 2014-05-25 10:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkApplication: Fix two muxer-related memory leaks (1.40 KB, patch)
2014-05-19 15:13 UTC, Kalev Lember
committed Details | Review

Description Kalev Lember 2014-05-19 15:11:58 UTC
GtkApplication instances end up holding a ref on itself when they add themselves as "app" to the GtkActionMuxer in startup(). This leads to GtkApplications never getting finalized.
Comment 1 Kalev Lember 2014-05-19 15:13:08 UTC
Created attachment 276788 [details] [review]
GtkApplication: Fix two muxer-related memory leaks

Drop the ref on the action muxer in finalize, and also make sure
shutdown() tears down the muxer setup done in startup().

When GtkApplication adds itself to a muxer, it causes the muxer to take
a ref on the GtkApplication. This has to be undone in shutdown() to make
sure the GtkApplication doesn't end up holding a ref on itself.
Comment 2 Matthias Clasen 2014-05-19 16:43:33 UTC
Looks right to me, but lets see what Ryan says
Comment 3 Allison Karlitskaya (desrt) 2014-05-25 10:27:41 UTC
Review of attachment 276788 [details] [review]:

Please go ahead.  Thanks for the catch.
Comment 4 Kalev Lember 2014-05-25 10:51:06 UTC
Thanks!

Attachment 276788 [details] pushed as 750f6b9 - GtkApplication: Fix two muxer-related memory leaks