[Libreoffice-commits] core.git: basic/source include/basic
Xisco Fauli
anistenis at gmail.com
Thu May 26 07:47:10 UTC 2016
basic/source/basmgr/basmgr.cxx | 6 +-----
include/basic/basmgr.hxx | 2 +-
2 files changed, 2 insertions(+), 6 deletions(-)
New commits:
commit 132f7b2a8cc986ee79c4124ed2bc368d6dfaa418
Author: Xisco Fauli <anistenis at gmail.com>
Date: Thu May 26 01:22:49 2016 +0200
tdf#89329: use unique_ptr for pImpl in basmgr
Change-Id: I2d6c6b997155183b058872db354de1b407998d3a
Reviewed-on: https://gerrit.libreoffice.org/25472
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/basic/source/basmgr/basmgr.cxx b/basic/source/basmgr/basmgr.cxx
index 089910c..3443016 100644
--- a/basic/source/basmgr/basmgr.cxx
+++ b/basic/source/basmgr/basmgr.cxx
@@ -886,10 +886,6 @@ BasicManager::~BasicManager()
{
// Notify listener if something needs to be saved
Broadcast( SfxSimpleHint( SFX_HINT_DYING) );
-
- // Destroy Basic-Infos...
- // In reverse order
- delete mpImpl;
}
void BasicManager::LegacyDeleteBasicManager( BasicManager*& _rpManager )
@@ -915,7 +911,7 @@ bool BasicManager::HasExeCode( const OUString& sLib )
void BasicManager::Init()
{
- mpImpl = new BasicManagerImpl();
+ mpImpl.reset( new BasicManagerImpl );
}
BasicLibInfo* BasicManager::CreateLibInfo()
diff --git a/include/basic/basmgr.hxx b/include/basic/basmgr.hxx
index 9f49387..5a98b51 100644
--- a/include/basic/basmgr.hxx
+++ b/include/basic/basmgr.hxx
@@ -116,7 +116,7 @@ private:
OUString maStorageName;
bool mbDocMgr;
- BasicManagerImpl* mpImpl;
+ std::unique_ptr<BasicManagerImpl> mpImpl;
BASIC_DLLPRIVATE void Init();
More information about the Libreoffice-commits
mailing list