point-platform / servant

Async .NET dependency injection, while you await!
Apache License 2.0
3 stars 0 forks source link

More control around tracking transient instances and their disposal #5

Open drewnoakes opened 8 years ago

drewnoakes commented 8 years ago

Otion to track transients via WeakReference<T> collection and dispose along with container.

Requestor can assume ownership of a newly created transient T instance by depending upon Unique<T> (which skips tracking the reference, but also throws for singletons), after which it must ensure correct disposal of the served transient, in its Dispose method or otherwise.