summaryrefslogtreecommitdiff
path: root/ucb
diff options
context:
space:
mode:
authorJian Fang Zhang <zhangjf@apache.org>2012-09-05 01:54:08 +0000
committerJian Fang Zhang <zhangjf@apache.org>2012-09-05 01:54:08 +0000
commit1e51e5dab1664dadb40509c4fab593fb27040efd (patch)
treecd986416aa0673c4351a8b5e44054f33ace03271 /ucb
parent6a2ea0d81349d3bf6e3ce71cd60288e70b34e198 (diff)
#i120738#, in Storage::release(), need call to OWeakObject::release() explicitly to make sure the week object is released correctly.
Found by: zhangjf Patch by: zhangjf
Notes
Notes: merged as: 8778882b8732454fac4a682e60a40ac2e3ad5c03
Diffstat (limited to 'ucb')
-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 96fb061ceb27..f5ae2804e703 100644
--- a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
@@ -191,11 +191,14 @@ void SAL_CALL Storage::acquire()
void SAL_CALL Storage::release()
throw ()
{
- if ( osl_decrementInterlockedCount( &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();
}
//=========================================================================