diff options
author | Frank Schönheit <fs@openoffice.org> | 2002-01-18 15:35:28 +0000 |
---|---|---|
committer | Frank Schönheit <fs@openoffice.org> | 2002-01-18 15:35:28 +0000 |
commit | bf37f042c9d2d53abb75bc5ec8b245a231612477 (patch) | |
tree | 42214e98a299a3f00582b8dc14e07f73124b2a5e /connectivity/source/drivers/ado/APreparedStatement.cxx | |
parent | 0684ab32a28c94e2a328b045c69eab1cb511ec64 (diff) |
#96445# massive re-arrangements regarding the ref-counts of the ADO system objects
Diffstat (limited to 'connectivity/source/drivers/ado/APreparedStatement.cxx')
-rw-r--r-- | connectivity/source/drivers/ado/APreparedStatement.cxx | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/connectivity/source/drivers/ado/APreparedStatement.cxx b/connectivity/source/drivers/ado/APreparedStatement.cxx index bf111a3e13e3..e86d318368e1 100644 --- a/connectivity/source/drivers/ado/APreparedStatement.cxx +++ b/connectivity/source/drivers/ado/APreparedStatement.cxx @@ -2,9 +2,9 @@ * * $RCSfile: APreparedStatement.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: oj $ $Date: 2001-12-11 09:10:12 $ + * last change: $Author: fs $ $Date: 2002-01-18 16:33:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,6 +137,18 @@ OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OTypeInf osl_decrementInterlockedCount( &m_refCount ); } + +// ------------------------------------------------------------------------- +OPreparedStatement::~OPreparedStatement() +{ + if (m_pParameters) + { + OSL_ENSURE( sal_False, "OPreparedStatement::~OPreparedStatement: not disposed!" ); + m_pParameters->Release(); + m_pParameters = NULL; + } +} + // ------------------------------------------------------------------------- Any SAL_CALL OPreparedStatement::queryInterface( const Type & rType ) throw(RuntimeException) @@ -170,8 +182,11 @@ Reference< XResultSetMetaData > SAL_CALL OPreparedStatement::getMetaData( ) thr void OPreparedStatement::disposing() { m_xMetaData = NULL; - if(m_pParameters) + if (m_pParameters) + { m_pParameters->Release(); + m_pParameters = NULL; + } OStatement_Base::disposing(); } // ------------------------------------------------------------------------- |