[Libreoffice-commits] .: comphelper/source

Noel Power noelp at kemper.freedesktop.org
Tue May 17 07:27:58 PDT 2011


 comphelper/source/misc/componentmodule.cxx |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

New commits:
commit 3bc484d46894fd9f32122e82dcc02ae3214abd6a
Author: Noel Power <noel.power at novell.com>
Date:   Tue May 17 15:25:19 2011 +0100

    Revert "do not leak memory"
    
    this seems to cause some problems with a number of components
    This reverts commit f9496177a4c942f2acc39a978a3cd65689f14d8d.

diff --git a/comphelper/source/misc/componentmodule.cxx b/comphelper/source/misc/componentmodule.cxx
index bb1cd73..56183da 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();
 


More information about the Libreoffice-commits mailing list