A logic's lifetime is bound to that of the output provider and is managed by the DecoupledOutputProvider's module. You can register a factory function withIDecoupledOutputProviderModule::RegisterLogicFactory.