[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sc/source

Bjoern Michaelsen bjoern.michaelsen at canonical.com
Tue Apr 12 10:25:10 UTC 2016


 sc/source/ui/dbgui/csvcontrol.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit 62fdce393276a8f5ad86a41dc49719c61581ce63
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date:   Tue Apr 12 12:20:07 2016 +0200

    lp#1566050: prevent cyclic reference zombies
    
    regression, likely from 2660d24a07866e083c5135ea263030f3e3a2e729:
    
    1/ Since that change mxAccessible in ScCsvGrid holds a rtl::Reference on
    a ScAccessibleCsvGrid
    2/ Which in turn holds a VclPtr<> (aka a rtl::Reference with lipstick)
    on the ScCsvControl
    
    These are a circular references, making both of them live forever and
    leak past the point where on LibreOffice close all of Vcl is long gone,
    when these are dtored. Clearing mxAccessible on disposing should help.
    
    Change-Id: Iebb2635ec4ea143e7f0dbfebad2e6141a68e72e8
    Reviewed-on: https://gerrit.libreoffice.org/24021
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
    Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
index 2fb1030..51ed04c 100644
--- a/sc/source/ui/dbgui/csvcontrol.cxx
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
@@ -81,6 +81,7 @@ void ScCsvControl::dispose()
 {
     if( mxAccessible.is() )
         mxAccessible->dispose();
+    mxAccessible = nullptr; // lp#1566050: prevent cyclic reference zombies
     Control::dispose();
 }
 


More information about the Libreoffice-commits mailing list