forked from square/dagger
-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Description
Currently Map multibindings can provide:
Map<Key, Value>
Map<Key, Provider<Value>>
I would like it to also provide:
Map<Key, Lazy<Value>>
Right now we use the Provider method. However our map only needs one instance of each Value. If we scope the Value we get one instance. If we leave Values un-scoped we get a new instance every time we access the map. Ideally each Value could be left un-scoped since they contain no state, but now we are creating many new instances of these objects unnecessarily.
Reactions are currently unavailable