Free descriptions copied for TankItem

Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Anton Lundin 2014-12-18 08:47:53 +01:00 committed by Dirk Hohndel
parent 4599172a19
commit f14ef84c9a
2 changed files with 8 additions and 0 deletions

View file

@ -33,6 +33,13 @@ TankItem::TankItem(QObject *parent) :
memset(&diveCylinderStore, 0, sizeof(diveCylinderStore));
}
TankItem::~TankItem()
{
// Should this be clear_dive(diveCylinderStore)?
for (int i = 0; i < MAX_CYLINDERS; i++)
free((void *)diveCylinderStore.cylinder[i].type.description);
}
void TankItem::setData(DivePlotDataModel *model, struct plot_info *plotInfo, struct dive *d)
{
free(pInfoEntry);

View file

@ -15,6 +15,7 @@ class TankItem : public QObject, public QGraphicsRectItem
public:
explicit TankItem(QObject *parent = 0);
~TankItem();
void setHorizontalAxis(DiveCartesianAxis *horizontal);
void setData(DivePlotDataModel *model, struct plot_info *plotInfo, struct dive *d);