code: protected void shutdown() {
          LOGGER.info("Shutting down SimulatorImpl");
          LOGGER.info("Cancelling timer thread");
          mTimer.cancel();
          mTimer = null;
          mSimulator = mPySimulator = null;
          mInterpreter = null;
      }
docs: Shuts down properly.
  This method is typically called from a shutdown hook to terminate the simulator properly.
  <p>
  Cancels the timer thread used for task scheduling.
  Overloading implementations should call this method AFTER doing its own work.