From c64227efe02868438c7afe2339c89014fc285ee2 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 6 Mar 2014 14:26:33 -0800 Subject: Fix real memory leak We can't keep the cache around (even though it's tempting) as the next iteration might change the start time of the planned dive or other parameters which would make the cached data invalid. Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 32e957363..b4ca5ba89 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -1445,6 +1445,8 @@ void DivePlannerPointsModel::createTemporaryPlan() copy_samples(tempDive, current_dive); copy_events(tempDive, current_dive); } + // throw away the cache + free(cache); #if DEBUG_PLAN dump_plan(&diveplan); #endif -- cgit v1.2.3-70-g09d2