summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/ado/AConnection.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-08-23 09:06:33 +0000
committerOcke Janssen <oj@openoffice.org>2002-08-23 09:06:33 +0000
commit1c5604351238ee70e9529055e93edc2375b87ee5 (patch)
tree5173d15644d1149478b2edc36c56e62c4fcd9f06 /connectivity/source/drivers/ado/AConnection.cxx
parent33fc84a55fce55120e7717aec6e29285b94c08e4 (diff)
#96826# delete type info when in disposing
Diffstat (limited to 'connectivity/source/drivers/ado/AConnection.cxx')
-rw-r--r--connectivity/source/drivers/ado/AConnection.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/connectivity/source/drivers/ado/AConnection.cxx b/connectivity/source/drivers/ado/AConnection.cxx
index f4799705b700..3d50be769657 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.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: oj $ $Date: 2002-07-22 10:05:54 $
+ * last change: $Author: oj $ $Date: 2002-08-23 10:06:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -169,8 +169,6 @@ OConnection::OConnection(const ::rtl::OUString& url, const Sequence< PropertyVal
//-----------------------------------------------------------------------------
OConnection::~OConnection()
{
- delete m_pAdoConnection;
-
ModuleContext::ReleaseRef();
}
//-----------------------------------------------------------------------------
@@ -527,18 +525,25 @@ void OConnection::disposing()
// m_aTables.disposing();
for (OWeakRefArray::iterator i = m_aStatements.begin(); m_aStatements.end() != i; ++i)
- {
- Reference< XComponent > xComp(i->get(), UNO_QUERY);
- if (xComp.is())
- xComp->dispose();
- }
+ ::comphelper::disposeComponent(i->get());
m_aStatements.clear();
m_bClosed = sal_True;
m_xMetaData = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XDatabaseMetaData>();
+ m_xCatalog = ::com::sun::star::uno::WeakReference< ::com::sun::star::sdbcx::XTablesSupplier>();
+ m_pDriver = NULL;
m_pAdoConnection->Close();
+ OTypeInfoMap::iterator aIter = m_aTypeInfo.begin();
+ for (; aIter != m_aTypeInfo.end(); ++aIter)
+ delete aIter->second;
+
+ m_aTypeInfo.clear();
+
+ delete m_pAdoConnection;
+ m_pAdoConnection = NULL;
+
dispose_ChildImpl();
OConnection_BASE::disposing();
}