mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Removed memleak created by the diveplan calculations
Removed a small memleak created by the diveplan calculations. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
This commit is contained in:
parent
c7c5ca7c3e
commit
19fbc108c3
2 changed files with 11 additions and 2 deletions
|
@ -195,6 +195,16 @@ void DivePlannerGraphics::createDecoStops()
|
||||||
scene()->addItem(item);
|
scene()->addItem(item);
|
||||||
lines << item;
|
lines << item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
deleteTemporaryDivePlan(diveplan.dp);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DivePlannerGraphics::deleteTemporaryDivePlan(divedatapoint* dp)
|
||||||
|
{
|
||||||
|
if (!dp)
|
||||||
|
return;
|
||||||
|
deleteTemporaryDivePlan(dp->next);
|
||||||
|
free(dp);
|
||||||
}
|
}
|
||||||
|
|
||||||
void DivePlannerGraphics::resizeEvent(QResizeEvent* event)
|
void DivePlannerGraphics::resizeEvent(QResizeEvent* event)
|
||||||
|
|
|
@ -68,7 +68,7 @@ protected:
|
||||||
void clearGeneratedDeco();
|
void clearGeneratedDeco();
|
||||||
void createDecoStops();
|
void createDecoStops();
|
||||||
bool isPointOutOfBoundaries(const QPointF& point);
|
bool isPointOutOfBoundaries(const QPointF& point);
|
||||||
|
void deleteTemporaryDivePlan(struct divedatapoint* dp);
|
||||||
private slots:
|
private slots:
|
||||||
void increaseTime();
|
void increaseTime();
|
||||||
void increaseDepth();
|
void increaseDepth();
|
||||||
|
@ -76,7 +76,6 @@ private slots:
|
||||||
void cancelClicked();
|
void cancelClicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
void moveActiveHandler(const QPointF& pos);
|
void moveActiveHandler(const QPointF& pos);
|
||||||
QList<QGraphicsLineItem*> lines;
|
QList<QGraphicsLineItem*> lines;
|
||||||
QList<DiveHandler *> handles;
|
QList<DiveHandler *> handles;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue