update Model.memory.delete to Model.memory.removeAll