You can't (at least not easily). Release you factory components.

On 2010-04-13 03:23, bling wrote:
var k = new DefaultKernel();
k.ReleasePolicy = new NoTrackingReleasePolicy();
k.AddFacility<TypedFactoryFacility>();
k.Register(Component.For<IFactory>().AsFactory());
k.Register(Component.For<Something>().Lifestyle.Transient);

var obj = k.Resolve<IFactory>().Create<Something>();
var wr = new WeakReference(obj);
obj = null;
GC.Collect();

Assert.IsFalse(wr.IsAlive);

The above test will fail.  How can I prevent it from tracking
instances?  Thanks.


--
You received this message because you are subscribed to the Google Groups "Castle 
Project Users" group.
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.

Reply via email to