dispose() methods should clear their smart pointers
especiall the ref-counted ones Change-Id: Ib3bb029043b1b923010ef4a47bfc377e1f569da7 Reviewed-on: https://gerrit.libreoffice.org/76102 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -172,6 +172,7 @@ namespace comphelper
|
||||
{
|
||||
m_xInner->removeEventListener( this );
|
||||
m_xInner->dispose();
|
||||
m_xInner.clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -226,6 +226,7 @@ void OAppDetailPageHelper::dispose()
|
||||
Reference< ::util::XCloseable> xCloseable(m_xFrame,UNO_QUERY);
|
||||
if ( xCloseable.is() )
|
||||
xCloseable->close(true);
|
||||
m_xFrame.clear();
|
||||
}
|
||||
catch(const Exception&)
|
||||
{
|
||||
|
@@ -694,6 +694,7 @@ void SbaGridControl::dispose()
|
||||
{
|
||||
if (m_nAsyncDropEvent)
|
||||
Application::RemoveUserEvent(m_nAsyncDropEvent);
|
||||
m_nAsyncDropEvent = nullptr;
|
||||
FmGridControl::dispose();
|
||||
}
|
||||
|
||||
|
@@ -118,9 +118,11 @@ void OReportSection::dispose()
|
||||
m_pPage = nullptr;
|
||||
if ( m_pMulti.is() )
|
||||
m_pMulti->dispose();
|
||||
m_pMulti.clear();
|
||||
|
||||
if ( m_pReportListener.is() )
|
||||
m_pReportListener->dispose();
|
||||
m_pReportListener.clear();
|
||||
m_pFunc.reset();
|
||||
|
||||
{
|
||||
|
@@ -108,8 +108,10 @@ void OSectionWindow::dispose()
|
||||
{
|
||||
if ( m_pSectionMulti.is() )
|
||||
m_pSectionMulti->dispose();
|
||||
m_pSectionMulti.clear();
|
||||
if ( m_pGroupMulti.is() )
|
||||
m_pGroupMulti->dispose();
|
||||
m_pGroupMulti.clear();
|
||||
}
|
||||
catch (uno::Exception&)
|
||||
{
|
||||
|
@@ -124,6 +124,7 @@ void SmGraphicWindow::dispose()
|
||||
{
|
||||
if (mxAccessible.is())
|
||||
mxAccessible->ClearWin(); // make Accessible nonfunctional
|
||||
mxAccessible.clear();
|
||||
CaretBlinkStop();
|
||||
ScrollableWindow::dispose();
|
||||
}
|
||||
|
@@ -1423,6 +1423,7 @@ void UnoTreeListBoxImpl::dispose()
|
||||
{
|
||||
if( mxPeer.is() )
|
||||
mxPeer->disposeControl();
|
||||
mxPeer.clear();
|
||||
SvTreeListBox::dispose();
|
||||
}
|
||||
|
||||
|
@@ -1069,6 +1069,7 @@ namespace svxform
|
||||
::osl::MutexGuard aGuard( m_aMutex );
|
||||
m_bDisposed = true;
|
||||
m_pScriptListener->dispose();
|
||||
m_pScriptListener.clear();
|
||||
}
|
||||
|
||||
|
||||
|
@@ -87,6 +87,7 @@ void SwDBTablePreviewDialog::dispose()
|
||||
{
|
||||
m_xFrame->setComponent(nullptr, nullptr);
|
||||
m_xFrame->dispose();
|
||||
m_xFrame.clear();
|
||||
}
|
||||
m_pDescriptionFI.clear();
|
||||
m_pBeamerWIN.clear();
|
||||
|
@@ -205,6 +205,7 @@ uno::Sequence< sal_Int8 > SAL_CALL Storage::getImplementationId()
|
||||
void SAL_CALL Storage::dispose()
|
||||
{
|
||||
m_xWrappedStorage->dispose();
|
||||
m_xWrappedStorage.clear();
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user