Fix memory leak.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2018-05-10 13:46:50 +03:00
parent 1158b06425
commit e3cfd7a241
2 changed files with 8 additions and 1 deletions

View File

@ -249,6 +249,13 @@ VAbstractPattern::VAbstractPattern(QObject *parent)
modified(false) modified(false)
{} {}
//---------------------------------------------------------------------------------------------------------------------
VAbstractPattern::~VAbstractPattern()
{
qDeleteAll(toolsOnRemove);
toolsOnRemove.clear();
}
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
QStringList VAbstractPattern::ListMeasurements() const QStringList VAbstractPattern::ListMeasurements() const
{ {

View File

@ -84,7 +84,7 @@ class VAbstractPattern : public VDomDocument
Q_OBJECT Q_OBJECT
public: public:
explicit VAbstractPattern(QObject *parent = nullptr); explicit VAbstractPattern(QObject *parent = nullptr);
virtual ~VAbstractPattern() Q_DECL_EQ_DEFAULT; virtual ~VAbstractPattern();
QStringList ListMeasurements() const; QStringList ListMeasurements() const;
QVector<VFormulaField> ListExpressions() const; QVector<VFormulaField> ListExpressions() const;