diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/control/tabctrl.cxx | 2 | ||||
-rw-r--r-- | vcl/source/edit/vclmedit.cxx | 9 | ||||
-rw-r--r-- | vcl/source/gdi/print3.cxx | 1 | ||||
-rw-r--r-- | vcl/source/window/btndlg.cxx | 6 | ||||
-rw-r--r-- | vcl/source/window/builder.cxx | 1 |
5 files changed, 16 insertions, 3 deletions
diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index 961dd919f760..90184ecd7ec4 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -204,6 +204,8 @@ void TabControl::dispose() ImplFreeLayoutData(); // delete TabCtrl data + if (mpTabCtrlData) + mpTabCtrlData->mpListBox.disposeAndClear(); delete mpTabCtrlData; mpTabCtrlData = NULL; Control::dispose(); diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 4322248fad75..6371297691dc 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -184,6 +184,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle ) bool bScrollbarsChanged = false; if ( bHaveVScroll != bNeedVScroll ) { + mpVScrollBar.disposeAndClear(); mpVScrollBar = bNeedVScroll ? new ScrollBar( pVclMultiLineEdit, WB_VSCROLL|WB_DRAG ) : NULL; if ( bNeedVScroll ) @@ -197,6 +198,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle ) if ( bHaveHScroll != bNeedHScroll ) { + mpHScrollBar.disposeAndClear(); mpHScrollBar = bNeedHScroll ? new ScrollBar( pVclMultiLineEdit, WB_HSCROLL|WB_DRAG ) : NULL; if ( bNeedHScroll ) @@ -210,6 +212,7 @@ void ImpVclMEdit::ImpUpdateSrollBarVis( WinBits nWinStyle ) if ( bHaveScrollBox != bNeedScrollBox ) { + mpScrollBox.disposeAndClear(); mpScrollBox = bNeedScrollBox ? new ScrollBarBox( pVclMultiLineEdit, WB_SIZEABLE ) : NULL; if ( bNeedScrollBox ) @@ -255,10 +258,10 @@ void ImpVclMEdit::InitFromStyle( WinBits nWinStyle ) ImpVclMEdit::~ImpVclMEdit() { EndListening( *mpTextWindow->GetTextEngine() ); - mpScrollBox.disposeAndClear(); - mpVScrollBar.disposeAndClear(); - mpHScrollBar.disposeAndClear(); mpTextWindow.disposeAndClear(); + mpHScrollBar.disposeAndClear(); + mpVScrollBar.disposeAndClear(); + mpScrollBox.disposeAndClear(); pVclMultiLineEdit.disposeAndClear(); } diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index 8216e6e1e7d4..b5e78453ea4c 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -191,6 +191,7 @@ public: mnDefaultPaperBin( -1 ), mnFixedPaperBin( -1 ) {} + ~ImplPrinterControllerData() { mpProgress.disposeAndClear(); } Size getRealPaperSize( const Size& i_rPageSize, bool bNoNUP ) const { diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index 37a4b3a5a856..b0552fff1e69 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -64,6 +64,11 @@ ButtonDialog::~ButtonDialog() void ButtonDialog::dispose() { + for ( btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it) + { + if ( it->mbOwnButton ) + it->mpPushButton.disposeAndClear(); + } maItemList.clear(); Dialog::dispose(); } @@ -343,6 +348,7 @@ void ButtonDialog::Clear() for (btn_iterator it = maItemList.begin(); it != maItemList.end(); ++it) { it->mpPushButton->Hide(); + it->mpPushButton.disposeAndClear(); } maItemList.clear(); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 92595d061c33..7a4bd3d2b917 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -3286,6 +3286,7 @@ void VclBuilder::delete_by_name(const OString& sID) { if (aI->m_sID.equals(sID)) { + aI->m_pWindow.disposeAndClear(); m_aChildren.erase(aI); break; } |