diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-02-20 07:46:36 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-02-20 07:46:36 +0000 |
commit | 10bd2eb65685788199e89120a6f48bbf8632f7fb (patch) | |
tree | afef5c2313046835400f4616fedbf022ee207c48 /framework/source/threadhelp | |
parent | e39e7a28eb5b96608c389447db3d28a633f84352 (diff) |
INTEGRATION: CWS vcl17 (1.2.188); FILE MERGED
2003/11/24 14:03:49 pl 1.2.188.1: #i22598# fixed some memory leaks (thanks to Dan Williams)
Diffstat (limited to 'framework/source/threadhelp')
-rw-r--r-- | framework/source/threadhelp/lockhelper.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/framework/source/threadhelp/lockhelper.cxx b/framework/source/threadhelp/lockhelper.cxx index 820ee4cc4ca9..500866397ed9 100644 --- a/framework/source/threadhelp/lockhelper.cxx +++ b/framework/source/threadhelp/lockhelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: lockhelper.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: as $ $Date: 2001-06-19 08:25:36 $ + * last change: $Author: obo $ $Date: 2004-02-20 08:46:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -122,6 +122,7 @@ LockHelper::LockHelper( ::vos::IMutex* pSolarMutex ) , m_pSolarMutex ( NULL ) , m_pFairRWLock ( NULL ) , m_pShareableOslMutex( NULL ) + , m_bDummySolarMutex ( sal_False ) { m_eLockType = implts_getLockType(); switch( m_eLockType ) @@ -134,7 +135,8 @@ LockHelper::LockHelper( ::vos::IMutex* pSolarMutex ) case E_SOLARMUTEX : { if( pSolarMutex == NULL ) { - m_pSolarMutex = new ::vos::OMutex; + m_pSolarMutex = new ::vos::OMutex; + m_bDummySolarMutex = sal_True; } else { @@ -184,6 +186,11 @@ LockHelper::~LockHelper() } if( m_pSolarMutex != NULL ) { + if (m_bDummySolarMutex) + { + delete static_cast<vos::OMutex*>(m_pSolarMutex); + m_bDummySolarMutex = sal_False; + } m_pSolarMutex = NULL; } if( m_pFairRWLock != NULL ) |