diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-23 13:53:42 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-24 06:54:06 +0000 |
commit | 111de438ea3e512a541281dc0716cc728ea8d152 (patch) | |
tree | 2c9ca866e79ed0cfc9299e553a87239345c515a6 /ucbhelper | |
parent | d3f21849ec8580fdb59a1f0b35453657f4050e0f (diff) |
remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and
then release() in the destructor.
found mostly by
git grep -n -B5 -e '->release()'
Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f
Reviewed-on: https://gerrit.libreoffice.org/25363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'ucbhelper')
-rw-r--r-- | ucbhelper/source/client/proxydecider.cxx | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/ucbhelper/source/client/proxydecider.cxx b/ucbhelper/source/client/proxydecider.cxx index 5c04d7910794..8b7630b9db17 100644 --- a/ucbhelper/source/client/proxydecider.cxx +++ b/ucbhelper/source/client/proxydecider.cxx @@ -772,19 +772,15 @@ void InternetProxyDecider_Impl::setNoProxyList( InternetProxyDecider::InternetProxyDecider( const uno::Reference< uno::XComponentContext>& rxContext ) -: m_pImpl( new proxydecider_impl::InternetProxyDecider_Impl( rxContext ) ) +: m_xImpl( new proxydecider_impl::InternetProxyDecider_Impl( rxContext ) ) { - m_pImpl->acquire(); } InternetProxyDecider::~InternetProxyDecider() { // Break circular reference between config listener and notifier. - m_pImpl->dispose(); - - // Let him go... - m_pImpl->release(); + m_xImpl->dispose(); } @@ -792,7 +788,7 @@ bool InternetProxyDecider::shouldUseProxy( const OUString & rProtocol, const OUString & rHost, sal_Int32 nPort ) const { - const InternetProxyServer & rData = m_pImpl->getProxy( rProtocol, + const InternetProxyServer & rData = m_xImpl->getProxy( rProtocol, rHost, nPort ); return !rData.aName.isEmpty(); @@ -804,7 +800,7 @@ const InternetProxyServer & InternetProxyDecider::getProxy( const OUString & rHost, sal_Int32 nPort ) const { - return m_pImpl->getProxy( rProtocol, rHost, nPort ); + return m_xImpl->getProxy( rProtocol, rHost, nPort ); } } // namespace ucbhelper |