kbrown / rpms / libreoffice

Forked from rpms/libreoffice 2 years ago
Clone

Blame SOURCES/0001-lp-1566050-prevent-cyclic-reference-zombies.patch

f325b2
From 25b8bcab289f13cab6c0a154a0c32ab19de2ef21 Mon Sep 17 00:00:00 2001
f325b2
From: Bjoern Michaelsen <bjoern.michaelsen@canonical.com>
f325b2
Date: Tue, 12 Apr 2016 12:20:07 +0200
f325b2
Subject: [PATCH] lp#1566050: prevent cyclic reference zombies
f325b2
f325b2
regression, likely from 2660d24a07866e083c5135ea263030f3e3a2e729:
f325b2
f325b2
1/ Since that change mxAccessible in ScCsvGrid holds a rtl::Reference on
f325b2
a ScAccessibleCsvGrid
f325b2
2/ Which in turn holds a VclPtr<> (aka a rtl::Reference with lipstick)
f325b2
on the ScCsvControl
f325b2
f325b2
These are a circular references, making both of them live forever and
f325b2
leak past the point where on LibreOffice close all of Vcl is long gone,
f325b2
when these are dtored. Clearing mxAccessible on disposing should help.
f325b2
f325b2
Change-Id: Iebb2635ec4ea143e7f0dbfebad2e6141a68e72e8
f325b2
Reviewed-on: https://gerrit.libreoffice.org/24020
f325b2
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
f325b2
Tested-by: Noel Grandin <noelgrandin@gmail.com>
f325b2
(cherry picked from commit 941e891d16853e5eff3e40cf48cdafb3146b2750)
f325b2
---
f325b2
 sc/source/ui/dbgui/csvcontrol.cxx | 1 +
f325b2
 1 file changed, 1 insertion(+)
f325b2
f325b2
diff --git a/sc/source/ui/dbgui/csvcontrol.cxx b/sc/source/ui/dbgui/csvcontrol.cxx
f325b2
index b53b5bc..7449192 100644
f325b2
--- a/sc/source/ui/dbgui/csvcontrol.cxx
f325b2
+++ b/sc/source/ui/dbgui/csvcontrol.cxx
f325b2
@@ -81,6 +81,7 @@ void ScCsvControl::dispose()
f325b2
 {
f325b2
     if( mxAccessible.is() )
f325b2
         mxAccessible->dispose();
f325b2
+    mxAccessible = nullptr; // lp#1566050: prevent cyclic reference zombies
f325b2
     Control::dispose();
f325b2
 }
f325b2
 
f325b2
-- 
f325b2
2.9.3
f325b2