summaryrefslogtreecommitdiff
path: root/vcl/workben
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-01-12 11:38:12 +0200
committerMichael Meeks <michael.meeks@collabora.com>2015-04-09 20:17:25 +0100
commit1f59e2cec3f4a22d612ca6cff06930c3d4bb77ca (patch)
tree22fb02505caea2c016d74b1a303cbcad1cb7614a /vcl/workben
parent9a6bf4be437102004a01ee5818e943f0e095eefe (diff)
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
Diffstat (limited to 'vcl/workben')
-rw-r--r--vcl/workben/outdevgrind.cxx1
-rw-r--r--vcl/workben/vcldemo.cxx13
2 files changed, 5 insertions, 9 deletions
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
@@ -1385,8 +1385,13 @@ public:
}
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());