summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ucb/source/ucp/tdoc/tdoc_stgelems.cxx11
1 files changed, 7 insertions, 4 deletions
diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index 6c32899b3447..cda68cffcb1c 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -179,11 +179,14 @@ void SAL_CALL Storage::acquire()
void SAL_CALL Storage::release()
throw ()
{
- if ( osl_atomic_decrement( &m_refCount ) == 0 )
- {
+ //#i120738, Storage::release overrides OWeakObject::release(),
+ //need call OWeakObject::release() to release OWeakObject::m_pWeakConnectionPoint
+
+ if ( m_refCount == 1 )
m_xFactory->releaseElement( this );
- delete this;
- }
+
+ //delete this;
+ OWeakObject::release();
}
//=========================================================================