[Libreoffice-commits] core.git: include/unotools unotools/source
Stephan Bergmann
sbergman at redhat.com
Tue Dec 19 14:23:41 UTC 2017
include/unotools/itemholderbase.hxx | 1 -
unotools/source/config/itemholder1.cxx | 5 -----
unotools/source/config/saveopt.cxx | 3 ---
3 files changed, 9 deletions(-)
New commits:
commit 66cd725b5f386d48252a620fb58415ddb65388ef
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Mon Dec 18 15:24:58 2017 +0100
Don't leak SvtSaveOptions instance through ItemHolder1::holdConfigItem
...where ItemHolder1 apparently leaks the items ever since
> commit ef2c49c9a5788e35249d8d5406a09c84ecd062ee
> Author: RĂ¼diger Timm <rt at openoffice.org>
> Date: Fri Nov 11 07:50:10 2005 +0000
>
> INTEGRATION: CWS perform06 (1.6.60); FILE MERGED
> 2005/11/07 13:32:40 as 1.6.60.2: #i56589# dont cache GlobalEventConfig() inside ItemHolder1^... combination of static pointer and WeakImplHelper cant not work
> 2005/10/25 08:04:02 as 1.6.60.1: #i56589# hold config items alive till office die
That started to cause problems when 78a6ce17f06fbe13b806fd563e85a4fe60d3bcfc
"DELETEZ->std::unique_ptr in toolkit,unotools" now stopped to leak the global
static std::unique_ptr<SvtLoadSaveOptions_Impl> pOptions;
in unotools/source/config/saveopt.cxx when any SvtSaveOptions instances are
leaked, so that at least PythonTest_pyuno_pytests_testcollections started to
fail in ASan builds now when that global pOptions is destroyed at exit.
I don't see a good reason for that ItemHolder1::holdConfigItem stuff here, so
lets try and drop it from SvtSaveOptions at least.
Change-Id: I6d44708fc4e2e5dfafaa9bfe8f3fa2f854ae0952
Reviewed-on: https://gerrit.libreoffice.org/46726
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/include/unotools/itemholderbase.hxx b/include/unotools/itemholderbase.hxx
index 9cb50417c163..94c20059abf9 100644
--- a/include/unotools/itemholderbase.hxx
+++ b/include/unotools/itemholderbase.hxx
@@ -66,7 +66,6 @@ enum class EItem
PrintFileOptions , // 2
PrintWarningOptions ,
- SaveOptions ,
SecurityOptions ,
SysLocaleOptions , // 2
diff --git a/unotools/source/config/itemholder1.cxx b/unotools/source/config/itemholder1.cxx
index f3dfcc98af5e..91a44af5d715 100644
--- a/unotools/source/config/itemholder1.cxx
+++ b/unotools/source/config/itemholder1.cxx
@@ -39,7 +39,6 @@
#include <unotools/pathoptions.hxx>
#include <unotools/printwarningoptions.hxx>
#include <unotools/optionsdlg.hxx>
-#include <unotools/saveopt.hxx>
#include <unotools/searchopt.hxx>
#include <unotools/securityoptions.hxx>
#include <unotools/viewoptions.hxx>
@@ -177,10 +176,6 @@ void ItemHolder1::impl_newItem(TItemInfo& rItem)
rItem.pItem.reset( new ::utl::MiscCfg() );
break;
- case EItem::SaveOptions :
- rItem.pItem.reset( new SvtSaveOptions() );
- break;
-
case EItem::SecurityOptions :
rItem.pItem.reset( new SvtSecurityOptions() );
break;
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 35b721702f21..657eb6563488 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -32,7 +32,6 @@
#include <osl/diagnose.h>
#include <osl/mutex.hxx>
#include <comphelper/processfactory.hxx>
-#include "itemholder1.hxx"
#include <officecfg/Office/Recovery.hxx>
using namespace utl;
@@ -805,8 +804,6 @@ SvtSaveOptions::SvtSaveOptions()
pOptions.reset(new SvtLoadSaveOptions_Impl);
pOptions->pSaveOpt.reset(new SvtSaveOptions_Impl);
pOptions->pLoadOpt.reset( new SvtLoadOptions_Impl);
-
- ItemHolder1::holdConfigItem(EItem::SaveOptions);
}
++nRefCount;
pImp = pOptions.get();
More information about the Libreoffice-commits
mailing list