User: ihi Date: 2006/08/04 06:56:21 Modified: dba/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
Log: INTEGRATION: CWS dba204c (1.9.4); FILE MERGED 2006/07/21 11:14:14 fs 1.9.4.2: still #i67635#: ooops don't access a NULL m_pColumns in disposing ... 2006/07/21 11:03:37 fs 1.9.4.1: #i67635# make m_pColumns an ::sdt::auto_ptr, again Holding it as ImplementationReference is bad, since this would |acquire| it, but it delegates all |acquire| and |release| calls to its parent (ourself) Holding it as auto_ptr doesn't hurt: If we're in the dtor, then nobody can have a reference to the columns, since this would have been delegated to ourself, which means we could not be in the dtor. File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: ComponentDefinition.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/ComponentDefinition.cxx?r1=1.9&r2=1.10 Delta lines: +9 -12 -------------------- --- ComponentDefinition.cxx 17 Jul 2006 13:08:59 -0000 1.9 +++ ComponentDefinition.cxx 4 Aug 2006 13:56:18 -0000 1.10 @@ -193,11 +193,8 @@ void SAL_CALL OComponentDefinition::disposing() { OContentHelper::disposing(); - if ( m_pColumns.is() ) - { + if ( m_pColumns.get() ) m_pColumns->disposing(); - m_pColumns.reset(); - } } // ----------------------------------------------------------------------------- IPropertyArrayHelper& OComponentDefinition::getInfoHelper() @@ -223,7 +220,7 @@ ::osl::MutexGuard aGuard(m_aMutex); ::connectivity::checkDisposed(OContentHelper::rBHelper.bDisposed); - if ( !m_pColumns.is() ) + if ( !m_pColumns.get() ) { ::std::vector< ::rtl::OUString> aNames; @@ -235,10 +232,10 @@ for ( ; aIter != aEnd; ++aIter ) aNames.push_back( aIter->first ); - m_pColumns = TColumnsHelper( new OColumns( *this, m_aMutex, sal_True, aNames, this, NULL, sal_True, sal_False, sal_False ) ); - m_pColumns->setParent(*this); + m_pColumns.reset( new OColumns( *this, m_aMutex, sal_True, aNames, this, NULL, sal_True, sal_False, sal_False ) ); + m_pColumns->setParent( *this ); } - return m_pColumns.getRef(); + return m_pColumns.get(); } // ----------------------------------------------------------------------------- OColumn* OComponentDefinition::createColumn(const ::rtl::OUString& _rName) const --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
