boost-ext / di

C++14 Dependency Injection Library
https://boost-ext.github.io/di
1.16k stars 140 forks source link

Can not uninstall binds? #390

Open henrya2 opened 5 years ago

henrya2 commented 5 years ago

Can not uninstall binds?

Specifications

We really need this feature, since our system need hot reloading during running. So lacking this feature make it impossible to correctly do hot reloading.

anders-wind commented 4 years ago

Did you find a way around this or did you drop di?

kanstantsin-chernik commented 4 years ago

@henrya2 there is a way to do it. You can use extensible_injector. Basically you are creating one 'core' di and second which is references first one and can use it content. Than if you need to uninstall something you are just getting rid of second injector but the 'core' one stays intact.

There is one more option: to extend runtime_provider with uninstall method. You are welcome to propose a PR. Seems like quite a straight forward thing to do.