Skip to content

Commit

Permalink
Merge pull request #45 from Artanidos/issue_22_scenario_5
Browse files Browse the repository at this point in the history
Fix mem-leaks scenario 5
  • Loading branch information
lavigne958 authored Jan 18, 2021
2 parents 8c60315 + 6f21a1b commit 9ec6b43
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/AnimationItems/vectorgraphic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ Vectorgraphic::Vectorgraphic(QByteArray arr, AnimationScene *scene)
setRect(0, 0, m_svg->boundingRect().width(), m_svg->boundingRect().height());
}

Vectorgraphic::~Vectorgraphic()
{
delete m_renderer;
delete m_svg;
}

QString Vectorgraphic::getHtml(QString id, QString)
{
QString svg = QString(m_data);
Expand Down
1 change: 1 addition & 0 deletions src/AnimationItems/vectorgraphic.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class Vectorgraphic : public AnimationItem
Vectorgraphic();
Vectorgraphic(QString filename, AnimationScene *scene);
Vectorgraphic(QByteArray arr, AnimationScene *scene);
~Vectorgraphic();
QString getHtml(QString id, QString assetsPath) Q_DECL_OVERRIDE;
void paint( QPainter *paint, const QStyleOptionGraphicsItem *, QWidget *);
void scaleObjects();
Expand Down

0 comments on commit 9ec6b43

Please sign in to comment.