Not precisely true.

It will track transients that have decommission concerns (Disposal is just one of them) or that have a dependency that has some decommission concerns, or if the handler for it or one of the dependencies enforces tracking (for example when you use DynamicParameters that have releasing counterpart).

Krzysztof

On 9/07/2010 3:19 AM, jobsamuel wrote:
My mistake, the container will track only those components that either
have decommission steps or have pooled lifestyle, since my
OrderService did not implement IDisposable it was not tracked.


On Jul 8, 10:06 pm, jobsamuel<[email protected]>  wrote:
With the following code:

             IWindsorContainer container = new WindsorContainer();
             container.Register(
                 Component.For<OrderService>().LifeStyle.Transient,

Component.For<INotifier>().ImplementedBy<DefaultNotifier>().LifeStyle.Trans­ient,

Component.For<IInventoryService>().ImplementedBy<DefaultInventoryService>()­.LifeStyle.Transient
                 );

             OrderService orderService =
container.Resolve<OrderService>();

Console.WriteLine(container.Kernel.ReleasePolicy.HasTrack(orderService));

I expected it to print true but it prints false. From what I have read
I expect the container to track even my transient instances. So why
does the HasTrack return false. The ReleasePolicy correctly shows
LifeCycledComponentReleasePolicy

--
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