incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhan...@apache.org
Subject svn commit: r1380957 - /incubator/ooo/trunk/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
Date Wed, 05 Sep 2012 02:54:08 GMT
Author: zhangjf
Date: Wed Sep  5 02:54:08 2012
New Revision: 1380957

URL: http://svn.apache.org/viewvc?rev=1380957&view=rev
Log:
#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

Modified:
    incubator/ooo/trunk/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx

Modified: incubator/ooo/trunk/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx?rev=1380957&r1=1380956&r2=1380957&view=diff
==============================================================================
--- incubator/ooo/trunk/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx (original)
+++ incubator/ooo/trunk/main/ucb/source/ucp/tdoc/tdoc_stgelems.cxx Wed Sep  5 02:54:08 2012
@@ -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();
 }
 
 //=========================================================================



Mime
View raw message