diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-02-22 10:48:51 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-02-22 13:37:53 +0100 |
commit | dffe94959ada5297c7c719497395f5dfe66c4d2f (patch) | |
tree | 31df661be83710232caef059baae0ab745449056 /connectivity/source/cpool | |
parent | 2a8e84448ce2a5603f9134ee830c389dbc4fd6b6 (diff) |
loplugin:refcounting in connectivity
Change-Id: Iff2f096e7ee00d9cb29d47462dd7e1963c6b06e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'connectivity/source/cpool')
-rw-r--r-- | connectivity/source/cpool/ZPoolCollection.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/connectivity/source/cpool/ZPoolCollection.cxx b/connectivity/source/cpool/ZPoolCollection.cxx index 17215ece7510..474490089879 100644 --- a/connectivity/source/cpool/ZPoolCollection.cxx +++ b/connectivity/source/cpool/ZPoolCollection.cxx @@ -281,9 +281,9 @@ OConnectionPool* OPoolCollection::getConnectionPool(const OUString& _sImplName, Reference<XPropertySet> xProp(_xDriverNode,UNO_QUERY); if(xProp.is()) xProp->addPropertyChangeListener(getEnableNodeName(),this); - OConnectionPool* pConnectionPool = new OConnectionPool(_xDriver,_xDriverNode,m_xProxyFactory); - aFind = m_aPools.emplace(_sImplName,pConnectionPool).first; - pRet = aFind->second.get(); + rtl::Reference<OConnectionPool> pConnectionPool = new OConnectionPool(_xDriver,_xDriverNode,m_xProxyFactory); + m_aPools.emplace(_sImplName,pConnectionPool); + pRet = pConnectionPool.get(); } OSL_ENSURE(pRet, "Could not query DriverManager from ConnectionPool!"); |