diff options
author | Ocke Janssen <oj@openoffice.org> | 2000-11-03 13:21:22 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2000-11-03 13:21:22 +0000 |
commit | 4ac2c6bc34802a5db6b08cbe393c324c190abc24 (patch) | |
tree | 09db322b522b5e3f43b80dff6ac96e1d87963825 /connectivity/source/drivers/ado/AConnection.cxx | |
parent | 60d02225043e82c9c4933980675c304aef94fa46 (diff) |
some changes in refcount
Diffstat (limited to 'connectivity/source/drivers/ado/AConnection.cxx')
-rw-r--r-- | connectivity/source/drivers/ado/AConnection.cxx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx index f956da93e85d..edefa8c38b1b 100644 --- a/connectivity/source/drivers/ado/AConnection.cxx +++ b/connectivity/source/drivers/ado/AConnection.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AConnection.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: oj $ $Date: 2000-10-24 16:11:26 $ + * last change: $Author: oj $ $Date: 2000-11-03 14:09:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -338,10 +338,14 @@ Reference< XDatabaseMetaData > SAL_CALL OConnection::getMetaData( ) throw(SQLEx if (OConnection_BASE::rBHelper.bDisposed) throw DisposedException(); - if(!m_xMetaData.is()) - m_xMetaData = new ODatabaseMetaData(this); + Reference< XDatabaseMetaData > xMetaData = m_xMetaData; + if(!xMetaData.is()) + { + xMetaData = new ODatabaseMetaData(this); + m_xMetaData = xMetaData; + } - return m_xMetaData; + return xMetaData; } // -------------------------------------------------------------------------------- void SAL_CALL OConnection::setReadOnly( sal_Bool readOnly ) throw(SQLException, RuntimeException) @@ -538,12 +542,12 @@ void OConnection::disposing() } m_aStatements.clear(); - Reference< XComponent > xComp2(m_xCatalog.get(), UNO_QUERY); - if(xComp2.is()) - xComp2->dispose(); +// Reference< XComponent > xComp2(m_xCatalog.get(), UNO_QUERY); +// if(xComp2.is()) +// xComp2->dispose(); - m_bClosed = sal_True; - m_xMetaData = NULL; + m_bClosed = sal_True; + m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>(); m_pAdoConnection->Close(); |