Kaydet (Commit) 36c11cb7 authored tarafından Dennis Francis's avatar Dennis Francis Kaydeden (comit) Caolán McNamara

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/18674Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 3a00aaef
......@@ -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;
};
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment