Code review comment for lp:~bregma/unity/fix-indicator-leaks

Revision history for this message
Marco Trevisan (TreviƱo) (3v1n0) wrote :

 - g_object_ref (indicator);

Why removing this? That code is used only indicators that have been instantiated somewhere else (not created by the ups, and what we call custom_indicators used only for testing), so in this case we should take the ownership of the indicator as there's no warranty that the previous owner is still alive (and that's why the test crashes).

Also I think that the code
132 if (g_object_is_floating (G_OBJECT (indicator)))
133 {
134 g_object_ref_sink (G_OBJECT (indicator));
135 }

Is not needed anymore now (indicators are no more GInitiallyUnowned, and even in that case it was placed in the wrong spot :/).

« Back to merge proposal