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);
|
||||
lines << item;
|
||||
}
|
||||
|
||||
deleteTemporaryDivePlan(diveplan.dp);
|
||||
}
|
||||
|
||||
void DivePlannerGraphics::deleteTemporaryDivePlan(divedatapoint* dp)
|
||||
{
|
||||
if (!dp)
|
||||
return;
|
||||
deleteTemporaryDivePlan(dp->next);
|
||||
free(dp);
|
||||
}
|
||||
|
||||
void DivePlannerGraphics::resizeEvent(QResizeEvent* event)
|
||||
|
|
|
@ -68,7 +68,7 @@ protected:
|
|||
void clearGeneratedDeco();
|
||||
void createDecoStops();
|
||||
bool isPointOutOfBoundaries(const QPointF& point);
|
||||
|
||||
void deleteTemporaryDivePlan(struct divedatapoint* dp);
|
||||
private slots:
|
||||
void increaseTime();
|
||||
void increaseDepth();
|
||||
|
@ -76,7 +76,6 @@ private slots:
|
|||
void cancelClicked();
|
||||
|
||||
private:
|
||||
|
||||
void moveActiveHandler(const QPointF& pos);
|
||||
QList<QGraphicsLineItem*> lines;
|
||||
QList<DiveHandler *> handles;
|
||||
|
|
Loading…
Add table
Reference in a new issue