Normally Unity container does not keep track of created transient objects. It creates them and forgets them. In certain situations it is useful to make container remember all transient objects it have created.
So, ContainerControlledTransientManager is required. This lifetime manager is the same as TransientLifetimeManager except if the object implements IDisposable it will keep strong reference to object and dispose it when container is disposed.
If created object is not disposable, container does not maintain any object references so when that object is released GC will collect it immediately.
Normally Unity container does not keep track of created transient objects. It creates them and forgets them. In certain situations it is useful to make container remember all transient objects it have created.
So,
ContainerControlledTransientManageris required. This lifetime manager is the same asTransientLifetimeManagerexcept if the object implementsIDisposableit will keep strong reference to object and dispose it when container is disposed.If created object is not disposable, container does not maintain any object references so when that object is released GC will collect it immediately.