avoid memory-leak when call runtimeError()