subautoclosable/subautoclosable library
Classes
-
SubAutoClosable<
Closable, SubClosable> -
represents pair of entities which should handled together to close them.
Good exaple is Listenable class from Flutter:
listenable.addListener(listener);
has corresponding closing methodlistenable.removeListener(listener);
With autoclosable lib it rewrites tolistenable.addListenerWithCloser(closer, listener);