diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2015-04-11 14:56:54 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2015-04-11 14:56:54 +0100 |
commit | e9696b975afeae970575cbd6bc782fbba484b2f3 (patch) | |
tree | 685d2d2413e72052a644c150f4bc9defce0f0503 | |
parent | fbdef593def24941db2a6123501277fe20b8b1d2 (diff) |
Fix more misc. lifecycle mistakes.
Change-Id: Iadf0767d41830296a441299bf10aaa1e7629a824
-rw-r--r-- | dbaccess/source/ui/app/AppTitleWindow.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/app/AppView.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/dialog/splitwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/Deck.cxx | 2 | ||||
-rw-r--r-- | toolkit/source/awt/vclxwindow.cxx | 3 |
5 files changed, 11 insertions, 16 deletions
diff --git a/dbaccess/source/ui/app/AppTitleWindow.cxx b/dbaccess/source/ui/app/AppTitleWindow.cxx index f6b91270a888..5beb0eec435f 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 356b2eb31d36..9a24ebfa1480 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 4a4e97e14215..7372a8c6465f 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 83603a7831c0..5739784e8630 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 0cfeff1fd4af..ba8e5b3feb11 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, |