diff options
author | Anton Lundin <glance@acc.umu.se> | 2014-12-18 08:47:53 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-12-18 08:34:00 -0800 |
commit | f14ef84c9a944e407396d6985dc3b8623f3a613b (patch) | |
tree | 5374a898838fa1b1b0215e673f4fb219d4b58808 /qt-ui | |
parent | 4599172a19f95664ed44b8293aeca2cf30e3f171 (diff) | |
download | subsurface-f14ef84c9a944e407396d6985dc3b8623f3a613b.tar.gz |
Free descriptions copied for TankItem
Signed-off-by: Anton Lundin <glance@acc.umu.se>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/tankitem.cpp | 7 | ||||
-rw-r--r-- | qt-ui/profile/tankitem.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/qt-ui/profile/tankitem.cpp b/qt-ui/profile/tankitem.cpp index 42692aacd..619368051 100644 --- a/qt-ui/profile/tankitem.cpp +++ b/qt-ui/profile/tankitem.cpp @@ -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); diff --git a/qt-ui/profile/tankitem.h b/qt-ui/profile/tankitem.h index f8d4ac9f8..d5c4b7f37 100644 --- a/qt-ui/profile/tankitem.h +++ b/qt-ui/profile/tankitem.h @@ -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); |