Kaydet (Commit) 941e891d authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen Kaydeden (comit) Noel Grandin

lp#1566050: prevent cyclic reference zombies

regression, likely from 2660d24a:

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/24020Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 48b8898b
...@@ -81,6 +81,7 @@ void ScCsvControl::dispose() ...@@ -81,6 +81,7 @@ void ScCsvControl::dispose()
{ {
if( mxAccessible.is() ) if( mxAccessible.is() )
mxAccessible->dispose(); mxAccessible->dispose();
mxAccessible = nullptr; // lp#1566050: prevent cyclic reference zombies
Control::dispose(); Control::dispose();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment