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 622374 - Clean up totem-playlist destruction
Clean up totem-playlist destruction
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2010-06-22 10:27 UTC by Alexander Saprykin
Modified: 2010-06-22 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Clean up totem-playlist destruction (1.12 KB, patch)
2010-06-22 10:27 UTC, Alexander Saprykin
none Details | Review
Clean up TotemPlaylist destruction (6.38 KB, patch)
2010-06-22 12:42 UTC, Bastien Nocera
committed Details | Review

Description Alexander Saprykin 2010-06-22 10:27:16 UTC
This patch cleans up totem-playlist destruction by unrefing GtkBuilder object on dispose
Comment 1 Alexander Saprykin 2010-06-22 10:27:18 UTC
Created attachment 164291 [details] [review]
Clean up totem-playlist destruction

Unref GtkBuilder object playlist->priv->xml on dispose instead of unrefing objects it contains
Comment 2 Philip Withnall 2010-06-22 11:23:19 UTC
I'd be inclined to make priv->xml local to the init function and just hold pointers to the save, up, down and remove buttons in TotemPlaylistPrivate. That way, we save a lot of the memory occupied by the GtkBuilder for the lifetime of TotemPlaylist. Then, only the top-level objects from the XML file need unreffing in the dispose function, as is currently the case.
Comment 3 Alexander Saprykin 2010-06-22 11:38:36 UTC
Philip, I can write such patch a bit later.
Comment 4 Bastien Nocera 2010-06-22 12:42:54 UTC
Created attachment 164300 [details] [review]
Clean up TotemPlaylist destruction

Keep a hold of the widgets we're interested in, and unref the
GtkBuilder ASAP.
Comment 5 Bastien Nocera 2010-06-22 12:44:55 UTC
Attachment 164300 [details] pushed as 1310287 - Clean up TotemPlaylist destruction