summaryrefslogtreecommitdiff
path: root/vcl/source/edit
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/source/edit
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/source/edit')
-rw-r--r--vcl/source/edit/vclmedit.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx
index 0ceabaf0c51b..c0406c6329a6 100644
--- a/vcl/source/edit/vclmedit.cxx
+++ b/vcl/source/edit/vclmedit.cxx
@@ -47,7 +47,8 @@ private:
public:
TextWindow( vcl::Window* pParent );
- virtual ~TextWindow();
+ virtual ~TextWindow();
+ virtual void dispose() SAL_OVERRIDE;
ExtTextEngine* GetTextEngine() const { return mpExtTextEngine; }
ExtTextView* GetTextView() const { return mpExtTextView; }
@@ -730,8 +731,14 @@ TextWindow::TextWindow( vcl::Window* pParent ) : Window( pParent )
TextWindow::~TextWindow()
{
+ dispose();
+}
+
+void TextWindow::dispose()
+{
delete mpExtTextView;
delete mpExtTextEngine;
+ Window::dispose();
}
void TextWindow::MouseMove( const MouseEvent& rMEvt )