SimonG96 / LightweightIocContainer

A lightweight IOC Container that is powerful enough to do all the things you need it to do.
MIT License
4 stars 2 forks source link

Use `ConditionalWeakTable<>` for singletons and multitons #19

Closed SimonG96 closed 5 years ago

SimonG96 commented 5 years ago

Change the List<> that is used for the _singletons and _multitons in the IocContainer to a ConditionalWeakTable<> to allow garbage collection once a TScope is destroyed.

SimonG96 commented 5 years ago

Don't use ConditionalWeakTable<> for _singletons, they shall always be available