Kaydet (Commit) e9696b97 authored tarafından Michael Meeks's avatar Michael Meeks

Fix more misc. lifecycle mistakes.

Change-Id: Iadf0767d41830296a441299bf10aaa1e7629a824
üst fbdef593
...@@ -56,7 +56,7 @@ void OTitleWindow::dispose() ...@@ -56,7 +56,7 @@ void OTitleWindow::dispose()
{ {
m_pChild->Hide(); m_pChild->Hide();
} }
m_pChild.clear(); m_pChild.disposeAndClear();
m_aSpace1.disposeAndClear(); m_aSpace1.disposeAndClear();
m_aSpace2.disposeAndClear(); m_aSpace2.disposeAndClear();
m_aTitle.disposeAndClear(); m_aTitle.disposeAndClear();
......
...@@ -93,15 +93,11 @@ void OAppBorderWindow::dispose() ...@@ -93,15 +93,11 @@ void OAppBorderWindow::dispose()
{ {
// destroy children // destroy children
if ( m_pPanel ) if ( m_pPanel )
{
m_pPanel->Hide(); m_pPanel->Hide();
} m_pPanel.disposeAndClear();
if ( m_pDetailView ) if ( m_pDetailView )
{
m_pDetailView->Hide(); m_pDetailView->Hide();
} m_pDetailView.disposeAndClear();
m_pPanel.clear();
m_pDetailView.clear();
m_pView.clear(); m_pView.clear();
vcl::Window::dispose(); vcl::Window::dispose();
} }
...@@ -213,12 +209,10 @@ OApplicationView::~OApplicationView() ...@@ -213,12 +209,10 @@ OApplicationView::~OApplicationView()
void OApplicationView::dispose() void OApplicationView::dispose()
{ {
if (m_xObject.is()) stopComponentListening(m_xObject);
{ m_xObject.clear();
stopComponentListening(m_xObject); m_pWin->Hide();
m_xObject.clear(); m_pWin.disposeAndClear();
}
m_pWin.clear();
ODataView::dispose(); ODataView::dispose();
} }
......
...@@ -318,7 +318,7 @@ void SfxSplitWindow::dispose() ...@@ -318,7 +318,7 @@ void SfxSplitWindow::dispose()
// window that is just being docked is always deleted from the outside. // window that is just being docked is always deleted from the outside.
pEmptyWin->pOwner = NULL; pEmptyWin->pOwner = NULL;
} }
pEmptyWin.clear(); pEmptyWin.disposeAndClear();
delete pDockArr; delete pDockArr;
pActive.clear(); pActive.clear();
......
...@@ -105,7 +105,7 @@ void Deck::Dispose (void) ...@@ -105,7 +105,7 @@ void Deck::Dispose (void)
if (*iPanel) if (*iPanel)
{ {
(*iPanel)->Dispose(); (*iPanel)->Dispose();
iPanel->reset(); iPanel->disposeAndClear();
} }
} }
......
...@@ -924,8 +924,9 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException, std: ...@@ -924,8 +924,9 @@ void VCLXWindow::dispose( ) throw(::com::sun::star::uno::RuntimeException, std:
{ {
VclPtr<OutputDevice> pOutDev = GetOutputDevice(); VclPtr<OutputDevice> pOutDev = GetOutputDevice();
SetWindow( NULL ); // so that handlers are logged off, if necessary (virtual) SetWindow( NULL ); // so that handlers are logged off, if necessary (virtual)
SetOutputDevice( NULL ); SetOutputDevice( pOutDev );
pOutDev.disposeAndClear(); pOutDev.disposeAndClear();
SetOutputDevice( NULL );
} }
// #i14103# dispose the accessible context after the window has been destroyed, // #i14103# dispose the accessible context after the window has been destroyed,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment