summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/odbc/OPreparedStatement.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/odbc/OPreparedStatement.cxx')
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index 241a0d8e5f0a..9f0da27ae997 100644
--- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx
+++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
@@ -64,12 +64,15 @@ namespace
OPreparedStatement::OPreparedStatement( OConnection* _pConnection,const OUString& sql)
:OStatement_BASE2(_pConnection)
,numParams(0)
- ,boundParams(nullptr)
,m_bPrepared(false)
{
m_sSqlStatement = sql;
}
+OPreparedStatement::~OPreparedStatement()
+{
+}
+
void SAL_CALL OPreparedStatement::acquire() throw()
{
OStatement_BASE2::acquire();
@@ -688,10 +691,7 @@ void OPreparedStatement::initBoundParam ()
if (numParams > 0)
{
- // Allocate an array of bound parameter objects
-
- boundParams = new OBoundParam[numParams];
-
+ boundParams.reset(new OBoundParam[numParams]);
}
}
@@ -853,8 +853,7 @@ void OPreparedStatement::setStream(
void OPreparedStatement::FreeParams()
{
numParams = 0;
- delete [] boundParams;
- boundParams = nullptr;
+ boundParams.reset();
}
void OPreparedStatement::setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const Any& rValue)