ucb/source/ucp/tdoc/tdoc_stgelems.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 8778882b8732454fac4a682e60a40ac2e3ad5c03
Author: Jian Fang Zhang <zhan...@apache.org>
Date:   Wed Sep 5 01:54:08 2012 +0000

    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

diff --git a/ucb/source/ucp/tdoc/tdoc_stgelems.cxx 
b/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
index 6c32899..cda68cf 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();
 }
 
 //=========================================================================
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to