code: def _stop(self):
          
          # Running flag down
          self.running = False
  
          # Unregister the service listener
          self.__context.remove_service_listener(self)
  
          # Clean up handler factories usages
          with self.__instances_lock:
              for svc_ref in self._handlers_refs:
                  self.__context.unget_service(svc_ref)
  
              self._handlers.clear()
              self._handlers_refs.clear()
docs: iPOPO is stopping: clean everything up