mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-18 16:27:34 +01:00
[apps/calculation] Reset history cell memoization when reloading the
table. Otherwise, the Poincare pool store useless layouts for cells that aren't displayed. This fixes the following issue: input "(transpose([1 2 3 4 5 6][1 2 3 4 5 6])^8", the computation works, clear the history, input the same calculation again, it fails with a memory error.
This commit is contained in:
committed by
LeaNumworks
parent
f6d59ae184
commit
2a03583fe0
@@ -24,6 +24,13 @@ HistoryController::HistoryController(EditExpressionController * editExpressionCo
|
||||
}
|
||||
|
||||
void HistoryController::reload() {
|
||||
/* When reloading, we might not used anymore cell that hold previous layouts.
|
||||
* We clean them all before reloading their content to avoid taking extra
|
||||
* useless space in the Poincare pool. */
|
||||
for (int i = 0; i < k_maxNumberOfDisplayedRows; i++) {
|
||||
m_calculationHistory[i].resetMemoization();
|
||||
}
|
||||
|
||||
m_selectableTableView.reloadData();
|
||||
/* TODO
|
||||
* Replace the following by selectCellAtLocation in order to avoid laying out
|
||||
|
||||
Reference in New Issue
Block a user