summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/FStatement.cxx
diff options
context:
space:
mode:
authorJavier Fernandez <jfernandez@igalia.com>2013-05-27 15:00:29 +0000
committerJavier Fernandez <jfernandez@igalia.com>2013-06-06 09:37:43 +0000
commit28c8baee278e341aab30e549a5d6f2d7a04932db (patch)
tree2e66b572825556ce9eb09cbdd83bb828d1bf3c30 /connectivity/source/drivers/firebird/FStatement.cxx
parentcb6b541b30c0f18d7270a38c80a6ecef30a321a0 (diff)
Adding disposing bits.
Change-Id: I997c23d0c0765a6929be89087330ac6616ccd28c
Diffstat (limited to 'connectivity/source/drivers/firebird/FStatement.cxx')
-rw-r--r--connectivity/source/drivers/firebird/FStatement.cxx21
1 files changed, 19 insertions, 2 deletions
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index 53452703850b..11b5d5cc3367 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -66,15 +66,17 @@ OStatement_Base::OStatement_Base(OConnection* _pConnection )
m_pConnection(_pConnection)
{
m_pConnection->acquire();
+ m_OUTsqlda = NULL;
+ m_INsqlda = NULL;
}
-// -----------------------------------------------------------------------------
+//-----------------------------------------------------------------------------
OStatement_Base::~OStatement_Base()
{
}
//------------------------------------------------------------------------------
void OStatement_Base::disposeResultSet()
{
- // free the cursor if alive
+ //free the cursor if alive
Reference< XComponent > xComp(m_xResultSet.get(), UNO_QUERY);
if (xComp.is())
xComp->dispose();
@@ -83,6 +85,8 @@ void OStatement_Base::disposeResultSet()
//------------------------------------------------------------------------------
void OStatement_BASE2::disposing()
{
+ printf("DEBUG !!! connectivity.firebird => OStatement_BASE2::disposing: \n");
+
::osl::MutexGuard aGuard(m_aMutex);
disposeResultSet();
@@ -91,6 +95,19 @@ void OStatement_BASE2::disposing()
m_pConnection->release();
m_pConnection = NULL;
+ if (m_OUTsqlda)
+ {
+ int i;
+ XSQLVAR *var;
+ for (i=0, var = m_OUTsqlda->sqlvar; i < m_OUTsqlda->sqld; i++, var++)
+ free(var->sqldata);
+ free(m_OUTsqlda);
+ }
+ if (m_INsqlda)
+ {
+ free(m_INsqlda);
+ }
+
dispose_ChildImpl();
OStatement_Base::disposing();
}