diff options
Diffstat (limited to 'extensions/source/inc')
-rw-r--r-- | extensions/source/inc/componentmodule.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/extensions/source/inc/componentmodule.cxx b/extensions/source/inc/componentmodule.cxx index 17f820e1f6f5..3f1f4925ea9d 100644 --- a/extensions/source/inc/componentmodule.cxx +++ b/extensions/source/inc/componentmodule.cxx @@ -42,9 +42,9 @@ namespace COMPMOD_NAMESPACE // implementation for <type>OModule</type>. not threadsafe, has to be guarded by its owner class OModuleImpl { - ResMgr* m_pResources; - bool m_bInitialized; - OString m_sFilePrefix; + std::unique_ptr<ResMgr> m_pResources; + bool m_bInitialized; + OString m_sFilePrefix; public: /// ctor @@ -66,7 +66,6 @@ namespace COMPMOD_NAMESPACE OModuleImpl::~OModuleImpl() { - delete m_pResources; } @@ -77,7 +76,7 @@ namespace COMPMOD_NAMESPACE { DBG_ASSERT(!m_sFilePrefix.isEmpty(), "OModuleImpl::getResManager: no resource file prefix!"); // create a manager with a fixed prefix - m_pResources = ResMgr::CreateResMgr(m_sFilePrefix.getStr()); + m_pResources.reset( ResMgr::CreateResMgr(m_sFilePrefix.getStr()) ); DBG_ASSERT(m_pResources, OStringBuffer("OModuleImpl::getResManager: could not create the resource manager (file name: ") .append(m_sFilePrefix) @@ -85,7 +84,7 @@ namespace COMPMOD_NAMESPACE m_bInitialized = true; } - return m_pResources; + return m_pResources.get(); } |