[Libreoffice-commits] core.git: include/vcl vcl/source
Dennis Francis
dennisfrancis.in at gmail.com
Fri Sep 18 01:01:06 PDT 2015
include/vcl/field.hxx | 2 ++
vcl/source/control/field.cxx | 6 ++++++
2 files changed, 8 insertions(+)
New commits:
commit 36c11cb71c6ec107cc08b16109e468765abc9867
Author: Dennis Francis <dennisfrancis.in at gmail.com>
Date: Fri Sep 18 07:33:27 2015 +0530
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 at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx
index 8ed681b..03be56c 100644
--- a/include/vcl/field.hxx
+++ b/include/vcl/field.hxx
@@ -739,6 +739,8 @@ public:
// Needed, because GetValue() with nPos hide these functions
virtual sal_Int64 GetValue( FieldUnit eOutUnit ) const SAL_OVERRIDE;
virtual sal_Int64 GetValue() const SAL_OVERRIDE;
+
+ virtual void dispose() SAL_OVERRIDE;
};
diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx
index 25d249c..3738147 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));
More information about the Libreoffice-commits
mailing list