reset method Null safety

void reset(
  1. {bool zeroMemory = true}
)

Implementation

void reset({bool zeroMemory = true}) {
  if (zeroMemory) {
    final storage = memory.storage;
    for (int i = 0; i < _lines * 2; i++) {
      storage.setUint8(i, 0);
    }
  }
  _lines = 0;
  _currentLine = 0;
  _extendedLines = 0;
  resetReturnStack();
  suspendedProgram?.abort();
  suspendedProgram = null;
}