Fix more misc. lifecycle mistakes.
Change-Id: Iadf0767d41830296a441299bf10aaa1e7629a824
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx
index f6b9127..5beb0ee 100644
--- a/dbaccess/source/ui/app/AppTitleWindow.cxx
+++ b/dbaccess/source/ui/app/AppTitleWindow.cxx
@@ -56,7 +56,7 @@ void OTitleWindow::dispose()
{
m_pChild->Hide();
}
m_pChild.clear();
m_pChild.disposeAndClear();
m_aSpace1.disposeAndClear();
m_aSpace2.disposeAndClear();
m_aTitle.disposeAndClear();
diff --git a/dbaccess/source/ui/app/AppView.cxx b/dbaccess/source/ui/app/AppView.cxx
index 356b2eb..9a24ebf 100644
--- a/dbaccess/source/ui/app/AppView.cxx
+++ b/dbaccess/source/ui/app/AppView.cxx
@@ -93,15 +93,11 @@ void OAppBorderWindow::dispose()
{
// destroy children
if ( m_pPanel )
{
m_pPanel->Hide();
}
m_pPanel.disposeAndClear();
if ( m_pDetailView )
{
m_pDetailView->Hide();
}
m_pPanel.clear();
m_pDetailView.clear();
m_pDetailView.disposeAndClear();
m_pView.clear();
vcl::Window::dispose();
}
@@ -213,12 +209,10 @@ OApplicationView::~OApplicationView()
void OApplicationView::dispose()
{
if (m_xObject.is())
{
stopComponentListening(m_xObject);
m_xObject.clear();
}
m_pWin.clear();
stopComponentListening(m_xObject);
m_xObject.clear();
m_pWin->Hide();
m_pWin.disposeAndClear();
ODataView::dispose();
}
diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx
index 4a4e97e..7372a8c 100644
--- a/sfx2/source/dialog/splitwin.cxx
+++ b/sfx2/source/dialog/splitwin.cxx
@@ -318,7 +318,7 @@ void SfxSplitWindow::dispose()
// window that is just being docked is always deleted from the outside.
pEmptyWin->pOwner = NULL;
}
pEmptyWin.clear();
pEmptyWin.disposeAndClear();
delete pDockArr;
pActive.clear();
diff --git a/sfx2/source/sidebar/Deck.cxx b/sfx2/source/sidebar/Deck.cxx
index 83603a7..5739784 100644
--- a/sfx2/source/sidebar/Deck.cxx
+++ b/sfx2/source/sidebar/Deck.cxx
@@ -105,7 +105,7 @@ void Deck::Dispose (void)
if (*iPanel)
{
(*iPanel)->Dispose();
iPanel->reset();
iPanel->disposeAndClear();
}
}
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index 0cfeff1..ba8e5b3f 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -924,8 +924,9 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException, std:
{
VclPtr<OutputDevice> pOutDev = GetOutputDevice();
SetWindow( NULL ); // so that handlers are logged off, if necessary (virtual)
SetOutputDevice( NULL );
SetOutputDevice( pOutDev );
pOutDev.disposeAndClear();
SetOutputDevice( NULL );
}
// #i14103# dispose the accessible context after the window has been destroyed,