[apps][escher] Do not forget to delete dynamic objects when reassigning

then or destructing them

Change-Id: If2b4de460163bf187152389e419d87329b83fc39
This commit is contained in:
Émilie Feral
2017-03-03 11:27:59 +01:00
committed by Romain Goyet
parent 276504e978
commit 7406e0d775
5 changed files with 31 additions and 0 deletions

View File

@@ -19,6 +19,15 @@ StoreController::StoreController(Responder * parentResponder, Store * store, But
m_titleLayout[1] = new BaselineRelativeLayout(new StringLayout("Y", 1, KDText::FontSize::Small), new StringLayout("i", 1, KDText::FontSize::Small), BaselineRelativeLayout::Type::Subscript);
}
StoreController::~StoreController() {
for (int i = 0; i < 2; i++) {
if (m_titleLayout[i]) {
delete m_titleLayout[i];
m_titleLayout[i] = nullptr;
}
}
}
void StoreController::willDisplayCellAtLocation(HighlightCell * cell, int i, int j) {
::StoreController::willDisplayCellAtLocation(cell, i, j);
if (cellAtLocationIsEditable(i, j)) {