It is not necessary for T, or the underlying component, to implement IDisposable. Disposing of the Owned`1 object is the correct way to handle cleanup of the dependency, as this will dispose of any other components created indirectly as well.
When Owned`1 is resolved, a new ILifetimeScope is created for the underlying T, and tagged with the service matching T, generally a TypedService. This means that shared instances can be tied to this scope by registering them as InstancePerMatchingLifetimeScope(new TypedService(typeof(T))).
- Initializes a new instance of the Owned`1 class.