[evolution/gnome-3-18] Do not leak a GalView in a GalViewInstance



commit 70235b35a13b53310823151ed9843143df2e0306
Author: Milan Crha <mcrha redhat com>
Date:   Fri Nov 13 12:52:53 2015 +0100

    Do not leak a GalView in a GalViewInstance
    
    The connect_view() method receives a copy or a new instance of the view
    already, thus no need to add a reference to it. This leak has several
    consequences, like in the Mail view the associated MessageList is not
    freed due to the GalView holding a reference to it.

 e-util/gal-view-instance.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/e-util/gal-view-instance.c b/e-util/gal-view-instance.c
index 26e01c3..109a5fa 100644
--- a/e-util/gal-view-instance.c
+++ b/e-util/gal-view-instance.c
@@ -142,7 +142,7 @@ connect_view (GalViewInstance *instance,
 
        if (instance->current_view)
                disconnect_view (instance);
-       instance->current_view = g_object_ref (view);
+       instance->current_view = view;
 
        view_class = GAL_VIEW_GET_CLASS (view);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]