From 1f59e2cec3f4a22d612ca6cff06930c3d4bb77ca Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 12 Jan 2015 11:38:12 +0200 Subject: vcl: window destructors calling dispose Extend plugin to warn on any vcl::Window subclass that has a destructor and does not implement dispose. Apply this provision to the necessary classes in vcl/ Change-Id: I05189f8df02568131d59fc44fea904c87733c8c7 --- vcl/workben/outdevgrind.cxx | 1 - vcl/workben/vcldemo.cxx | 13 +++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) (limited to 'vcl/workben') diff --git a/vcl/workben/outdevgrind.cxx b/vcl/workben/outdevgrind.cxx index 528eae381abb..72869d1d507a 100644 --- a/vcl/workben/outdevgrind.cxx +++ b/vcl/workben/outdevgrind.cxx @@ -72,7 +72,6 @@ class TestWindow : public Dialog Show(); } - virtual ~TestWindow() {} virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; }; diff --git a/vcl/workben/vcldemo.cxx b/vcl/workben/vcldemo.cxx index f272ccbb88c4..9860d7d20c84 100644 --- a/vcl/workben/vcldemo.cxx +++ b/vcl/workben/vcldemo.cxx @@ -1384,9 +1384,14 @@ public: underTesting = false; } virtual ~DemoWin() + { + dispose(); + } + virtual void dispose() SAL_OVERRIDE { mxThread.clear(); mrRenderer.removeInvalidate(this); + WorkWindow::dispose(); } virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE { @@ -1477,14 +1482,6 @@ public: Show(); } - - virtual ~DemoWidgets() - { - delete mpButton; - delete mpToolbox; - delete mpBox; - } - virtual void Paint(const Rectangle&) SAL_OVERRIDE { Rectangle aWholeSize(Point(0, 0),GetOutputSizePixel()); -- cgit