code: @Override
      public void onDestroy() {
          super.onDestroy();
          eventRegister.unregisterEventBuses();
  
          if (getControllerClass() != null) {
              try {
                  Mvc.graph().dereference(controller, getControllerClass(), null);
              } catch (ProviderMissingException e) {
                  //should never happen
                  Logger logger = LoggerFactory.getLogger(getClass());
                  logger.warn("Failed to dereference controller " + getControllerClass().getName(), e);
              }
          }
  
          Mvc.graph().release(this);
  
          Mvc.graph().unregisterMonitor(graphMonitor);
      }
docs: Callback of destroying a service