Search code examples
.netcastle-windsordispose

Do you need to call Dispose() on IWindsorContainer?


I just noticed that the IWindsorContainer interface in Castle Windsor includes Dispose().

None of the CastleWindsor tutorials I have seen (e.g. http://dotnetslackers.com/articles/designpatterns/InversionOfControlAndDependencyInjectionWithCastleWindsorContainerPart1.aspx and http://wiki.bittercoder.com/ContainerTutorials.ashx) declare the container in a using block or call Dispose on it.

Should I be calling Dispose() on my container, or does it depend? If the latter, upon what?

Thanks

David


Solution

  • Yes you do.