ranapat / instancefactory

Android java library for keeping instances
The Unlicense
1 stars 0 forks source link

Return new instances without caching them #14

Closed ranapat closed 6 months ago

ranapat commented 7 months ago

Currently all instances that are get or inject are auto-cached in memory. Maybe it will be useful to add method to get an instance without keeping it - the same as making new instance alone.

Reason - others do it, maybe there is a reason why Reason I can think of as of now - if "named template configurations are implemented".

Example:

If approach such issue - concept of named templates shall be also implemented.

ranapat commented 7 months ago

the new method will be called unique

ranapat commented 6 months ago

Examples: https://github.com/ranapat/instancefactory/blob/master/documentation/examples/kotlin/unique.md and https://github.com/ranapat/instancefactory/blob/master/documentation/examples/java/unique.md