diff options
author | Noel Power <noel.power@novell.com> | 2011-05-17 15:25:19 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2011-05-17 15:26:31 +0100 |
commit | 342af388111ac5aa311a887beae1565fe0b82d02 (patch) | |
tree | 3ae0189ff7366d933d65b165616b107c8efd0040 /comphelper | |
parent | d8ee7736dbdd762304edfd8ed81330b2068a1694 (diff) |
Revert "do not leak memory"
this seems to cause some problems with a number of components
This reverts commit f9496177a4c942f2acc39a978a3cd65689f14d8d.
Diffstat (limited to 'comphelper')
-rw-r--r-- | comphelper/source/misc/componentmodule.cxx | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx index 4318acc149be..c42308c71508 100644 --- a/comphelper/source/misc/componentmodule.cxx +++ b/comphelper/source/misc/componentmodule.cxx @@ -85,7 +85,7 @@ namespace comphelper //------------------------------------------------------------------------- OModule::OModule() :m_nClients( 0 ) - ,m_pImpl( 0 ) + ,m_pImpl( new OModuleImpl ) { } @@ -110,24 +110,17 @@ namespace comphelper //-------------------------------------------------------------------------- void OModule::onFirstClient() { - OSL_PRECOND( !m_pImpl, "called out of sequence" ); - if ( !m_pImpl ) - m_pImpl = new OModuleImpl; } //-------------------------------------------------------------------------- void OModule::onLastClient() { - OSL_PRECOND( m_pImpl, "called out of sequence" ); - delete m_pImpl; - m_pImpl = 0; } //-------------------------------------------------------------------------- void OModule::registerImplementation( const ComponentDescription& _rComp ) { ::osl::MutexGuard aGuard( m_aMutex ); - OSL_PRECOND( m_pImpl, "not initialized properly" ); if ( !m_pImpl ) throw RuntimeException(); |