On Friday, 29 April 2016 19:40:44 UTC-4, Andree Surya wrote: > > Is it a commonplace to inject a resource that should be cleaned-up after > (e.g. Closable)? In general, who has the responsibility for the clean-up? > > If the Reader is unscoped, then everybody who injects it gets a different instance, so it's up to the class that injects it to close it.
But in general I'd say binding something like a Reader is questionable. I'd rather bind something stateless like a Path, which can be used to open a Reader by whoever needs to. -- You received this message because you are subscribed to the Google Groups "google-guice" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/google-guice. To view this discussion on the web visit https://groups.google.com/d/msgid/google-guice/f293df1e-0653-4bcf-9841-e1c5dc281838%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
