Oct 25, 2012 at 2:05 AM
Edited Oct 25, 2012 at 2:17 AM
Is the container disposed?
If not nothing will be telling your instances to Dispose unless you have done it manually. Even so, the container still holds a reference to the lifetime manager which holds a reference to your instance which will stop the GC from collecting the object?
The HierarchicalLifetimeManager is conceptually the same as the ContainerControlledLifetimeManager as to the lifetime of the instances.
Transient and PerResolve - The top level object resolving the dependency chain owns the lifetime of the instance and therefore the responsibility to Dispose. The GC will collect once instances are out of scope.
ContainerController and Hierachical - Containers own the lifetime and therefore dispose. The GC will not collect unless the container is disposed.
PerThread and ExternallyControlled - All bets are off. Chances are the GC will collect your object so you need to implement a Finalizer to remove