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 method listenable.removeListener(listener); With autoclosable lib it rewrites to listenable.addListenerWithCloser(closer, listener);