A disposable injector would dispose all components contained within the injector. A binding would need to declare how they are disposed by an annotation such as @DisposedBy(Closeable.class) or @DisposedBy(value = arez.Disposable.class, method="dispose"). Alternatively we could invoke methods on a @Fragment type to dispose an instance. The injector would only generate the dispose operation if explicitly requested via a parameter such as @Injector.disposeable=ENABLE.
A disposable injector would dispose all components contained within the injector. A binding would need to declare how they are disposed by an annotation such as
@DisposedBy(Closeable.class)or@DisposedBy(value = arez.Disposable.class, method="dispose"). Alternatively we could invoke methods on a@Fragmenttype to dispose an instance. The injector would only generate the dispose operation if explicitly requested via a parameter such as@Injector.disposeable=ENABLE.