public interface IFactory : IDisposable
{
}
[Test]
public void DisposedFactory_Should_Not_Be_Tracked()
{
var c = new WindsorContainer();
c.AddFacility<TypedFactoryFacility>()
.Register(Component.For<IFactory>().AsFactory().LifestyleTransient());
var factory = c.Resolve<IFactory>();
Assert.IsTrue(c.Kernel.ReleasePolicy.HasTrack(factory));
factory.Dispose();
Assert.IsFalse(c.Kernel.ReleasePolicy.HasTrack(factory));
}
this behavior is surprising to me.... short of writing an interceptor, is
there another way i can release the factory without referencing the
container? thanks.
--
You received this message because you are subscribed to the Google Groups
"Castle Project Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/castle-project-users/-/dw_fOgOqghIJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/castle-project-users?hl=en.