summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorDennis Francis <dennisfrancis.in@gmail.com>2015-09-18 07:33:27 +0530
committerCaolán McNamara <caolanm@redhat.com>2015-09-18 08:00:38 +0000
commit36c11cb71c6ec107cc08b16109e468765abc9867 (patch)
tree6d141564239e81222e4e9a3697aef622e043ed4d /vcl
parent3a00aaef2a51d7a1a87475a316dc9ae232fac60c (diff)
fixes memleak : clear self referring VclPtr in MetricBox
Clears self referring VclPtr called mpField in MetricBox (inherited from FormatterBase class) via dispose() method of MetricBox. Change-Id: I375e03e814de3c6e47c36b1fc6f625b04521a5e2 Reviewed-on: https://gerrit.libreoffice.org/18674 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/field.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 25d249c87ab5..3738147fd398 100644
--- a/vcl/source/control/field.cxx
+++ b/vcl/source/control/field.cxx
@@ -1776,6 +1776,12 @@ MetricBox::MetricBox( vcl::Window* pParent, WinBits nWinStyle ) :
Reformat();
}
+void MetricBox::dispose()
+{
+ MetricFormatter::SetField(NULL);
+ ComboBox::dispose();
+}
+
Size MetricBox::CalcMinimumSize() const
{
Size aRet(calcMinimumSize(*this, *this));