tdf#89329: use unique_ptr for pImpl in basmgr

Change-Id: I2d6c6b997155183b058872db354de1b407998d3a
Reviewed-on: https://gerrit.libreoffice.org/25472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
Xisco Fauli 2016-05-26 01:22:49 +02:00 committed by Noel Grandin
parent 205863589d
commit 132f7b2a8c
2 changed files with 2 additions and 6 deletions

View File

@ -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()

View File

@ -116,7 +116,7 @@ private:
OUString maStorageName;
bool mbDocMgr;
BasicManagerImpl* mpImpl;
std::unique_ptr<BasicManagerImpl> mpImpl;
BASIC_DLLPRIVATE void Init();