windsorContainer.Register(
Component.For<ClassWithReferenceToDisposableService>()
.LifeStyle.Transient
.DynamicParameters((k, d) =>
{
d["disposableComponent"] =
windsorContainer.Resolve<DisposableComponent>();
}));
windsorContainer.Register(Component.For<DisposableComponent>().LifeStyle.Transient);
ClassWithReferenceToDisposableService service = windsorContainer.Resolve<ClassWithReferenceToDisposableService>();
windsorContainer.Release(service);
When the container releases the service, is does not dispose of the "disposableComponent" due to the dynamic parameter. How can i opt in during creation and tell windsor to release the "disposableComponent" when releasing the service?