diff options
author | Jian Fang Zhang <zhangjf@apache.org> | 2012-09-05 01:54:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-06-13 21:15:56 +0100 |
commit | 8778882b8732454fac4a682e60a40ac2e3ad5c03 (patch) | |
tree | 7b3f6d69e3cd022090cf0ec16221bb2770bb28e9 /ucb | |
parent | f52a86b4592ccd441c76f7d26ecbce235dd59b7f (diff) |
Resolves: #i120738# need to call OWeakObject::release() explicitly
to make sure the week object is released correctly.
Found by: zhangjf
Patch by: zhangjf
(cherry picked from commit 1e51e5dab1664dadb40509c4fab593fb27040efd)
Conflicts:
ucb/source/ucp/tdoc/tdoc_stgelems.cxx
Change-Id: I33d0b3b7cda2aa9a220056bf7d641b09036f89e9
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/tdoc/tdoc_stgelems.cxx | 11 |
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(); } //========================================================================= |