From 1798a4433280a6cae38fe535fb043a8e27d7f95a Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 Jan 2015 14:09:13 +0200 Subject: compilerplugin: check that necessary Window subclasses have a dispose method i.e. the ones that declare any VclPtr fields Change-Id: I7adfc3b3b190a2ede60bfccd08f85a269fae33ca --- vcl/source/control/combobox.cxx | 6 ++++++ vcl/source/window/dialog.cxx | 7 +++++++ vcl/source/window/layout.cxx | 6 ++++++ 3 files changed, 19 insertions(+) (limited to 'vcl') diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index d84797564a68..21877ecbaf99 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -78,6 +78,12 @@ ComboBox::~ComboBox() delete mpBtn; } +void ComboBox::dispose() +{ + mpSubEdit.disposeAndClear(); + Edit::dispose(); +} + void ComboBox::ImplInitComboBoxData() { mpSubEdit.disposeAndClear(); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index b5f7b5361f12..60aa87618f44 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -542,6 +542,13 @@ Dialog::~Dialog() mpDialogImpl = NULL; } +void Dialog::dispose() +{ + mpActionArea.disposeAndClear(); + mpContentArea.disposeAndClear(); + SystemWindow::dispose(); +} + IMPL_LINK_NOARG(Dialog, ImplAsyncCloseHdl) { Close(); diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 6a6c15408fe9..5fee1f0f1bd8 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -1878,6 +1878,12 @@ void VclEventBox::Command(const CommandEvent&) //discard events by default to block them reaching children } +void VclEventBox::dispose() +{ + m_aEventBoxHelper.disposeAndClear(); + VclBin::dispose(); +} + void VclSizeGroup::trigger_queue_resize() { //sufficient to trigger one widget to trigger all of them -- cgit