Hey 👋
Is there any "unload-hooks" functionality one can achieve with Koin? For example: You have some components that need to explicitly clean up and just removing a reference to it is not enough. You could let these components extend an interface that makes it clear that these components need to do clean up (
class A : Disposable
).
Disposable
offers a
dispose
function that every such component needs to implement.
Is there a way to let Koin trigger
dispose
of all loaded dependencies once
unloadModule(...)
is called?
reevn
07/29/2020, 3:32 PM
For other people interested in this:
It seems like there is no purely automatic way of achieving this, but in combination with the