Kaydet (Commit) 5d3bce41 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS configrefactor01 (1.6.24); FILE MERGED

2007/01/11 20:15:58 mmeeks 1.6.24.1: Submitted by: mmeeks
More re-factoring, lots of locking rationalized, drastically reduced
the mutex count, also removed ~300k interlocked increments with a non-interlocking
SimpleReferencedObject base
üst d92bc1c1
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
* *
* $RCSfile: elementaccess.cxx,v $ * $RCSfile: elementaccess.cxx,v $
* *
* $Revision: 1.6 $ * $Revision: 1.7 $
* *
* last change: $Author: obo $ $Date: 2006-09-16 14:57:07 $ * last change: $Author: ihi $ $Date: 2007-11-23 14:06:33 $
* *
* The Contents of this file are made available subject to * The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1. * the terms of GNU Lesser General Public License Version 2.1.
...@@ -65,43 +65,41 @@ void SAL_CALL BasicRootElement ::acquire() throw() { BaseImplHelper::acquire(); ...@@ -65,43 +65,41 @@ void SAL_CALL BasicRootElement ::acquire() throw() { BaseImplHelper::acquire();
void SAL_CALL BasicUpdateElement::acquire() throw() { BaseImplHelper::acquire(); } void SAL_CALL BasicUpdateElement::acquire() throw() { BaseImplHelper::acquire(); }
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
// FIXME: this looks highly flaky wrt. weak-refs etc.
#define LOCKED_RELEASE \
bool bLastRef = (1 == m_refCount); \
if (bLastRef) \
{ \
UnoApiLock::acquire(); \
configapi::implDisposeObject( getNodeAccess(), getElementClass() ); \
} \
BaseImplHelper::release(); \
if (bLastRef) \
UnoApiLock::release()
void SAL_CALL BasicInnerElement::release() throw() void SAL_CALL BasicInnerElement::release() throw()
{ {
if (1 == m_refCount) LOCKED_RELEASE;
{
configapi::implDisposeObject( getNodeAccess(), getElementClass() );
}
BaseImplHelper::release();
} }
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
void SAL_CALL BasicSetElement::release() throw() void SAL_CALL BasicSetElement::release() throw()
{ {
if (1 == m_refCount) LOCKED_RELEASE;
{
configapi::implDisposeObject( getNodeAccess(), getElementClass() );
}
BaseImplHelper::release();
} }
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
void SAL_CALL BasicRootElement::release() throw() void SAL_CALL BasicRootElement::release() throw()
{ {
if (1 == m_refCount) LOCKED_RELEASE;
{
configapi::implDisposeObject( getNodeAccess(), getElementClass() );
}
BaseImplHelper::release();
} }
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
void SAL_CALL BasicUpdateElement::release() throw() void SAL_CALL BasicUpdateElement::release() throw()
{ {
if (1 == m_refCount) LOCKED_RELEASE;
{
configapi::implDisposeObject( getNodeAccess(), getElementClass() );
}
BaseImplHelper::release();
} }
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment