diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-06 15:57:05 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-10-06 21:29:02 +0200 |
commit | c8cbcd77484d8172d76d0758f16f9b340277fa52 (patch) | |
tree | 66fd521b7e935d451b50e3d5d35f240fa72a8301 /connectivity/source/inc/odbc | |
parent | bab595df78bd05a45f92aa15dca058f27b86d5be (diff) |
use more rtl::Reference in connectivity
instead of manual ref counting
Change-Id: I210d4a2cd6487bd2d7d81a53106b484fe411ca9b
Reviewed-on: https://gerrit.libreoffice.org/43203
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/inc/odbc')
-rw-r--r-- | connectivity/source/inc/odbc/OConnection.hxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/connectivity/source/inc/odbc/OConnection.hxx b/connectivity/source/inc/odbc/OConnection.hxx index f93e1e42e691..ed82ea85cf59 100644 --- a/connectivity/source/inc/odbc/OConnection.hxx +++ b/connectivity/source/inc/odbc/OConnection.hxx @@ -55,11 +55,12 @@ namespace connectivity // Data attributes - std::map< SQLHANDLE,OConnection*> m_aConnections; // holds all connections which are need for several statements + std::map< SQLHANDLE, rtl::Reference<OConnection>> m_aConnections; // holds all connections which are need for several statements OUString m_sUser; // the user name - ODBCDriver* m_pDriver; // Pointer to the owning + rtl::Reference<ODBCDriver> + m_xDriver; // Pointer to the owning // driver object SQLHANDLE m_aConnectionHandle; @@ -125,7 +126,7 @@ namespace connectivity bool isIgnoreDriverPrivilegesEnabled() const { return m_bIgnoreDriverPrivileges; } bool preventGetVersionColumns() const { return m_bPreventGetVersionColumns; } bool useOldDateFormat() const { return m_bUseOldDateFormat; } - ODBCDriver* getDriver() const { return m_pDriver;} + ODBCDriver* getDriver() const { return m_xDriver.get();} SQLHANDLE createStatementHandle(); // close and free the handle and set it to SQL_NULLHANDLE |