I'm using Castle Windsor to inject dependencies into several WCF services. We're also using Castle.Facilities.WcfIntegration.DefaultServiceHostFactory and castle's wcfFacility. Our services are hosted in IIS which gives me access to the Global.aspx events. All our components are registered with the transient lifecyle. Currently I register all the components in the container during the application_start event then dispose the container in the application_end.
However, after reading several blogs and some SO postings I'm starting to get worried that my solution is leaky. In other words, I think that releasing the container at application_end is going to cause memory to slowly leak from my application. I'm thinking about registering and releasing in the request_start and request_end or mabye session_start and session_end events. The problem I have is that I don't know where to 'keep' the container so I can release it after the session or request have ended. Has anyone come across this issue? And if so, how did you solve it? And does my solution sound right?