void Mem::reset_memory() { story_fp = nullptr; if (undo_mem) { free_undo(undo_count); delete[] undo_mem; } undo_mem = nullptr; undo_count = 0; free(zmp); zmp = nullptr; }
void reset_memory (void) { if (story_fp) fclose (story_fp); story_fp = NULL; if (undo_mem) { free_undo (undo_count); free (undo_mem); } undo_mem = NULL; undo_count = 0; if (zmp) free (zmp); zmp = NULL; }/* reset_memory */