I'm coming from a background with Java and Spring, and I am rather new with Castle Windsor. I've read that it is important to know when transient components will be released by Castle since it tracks all components created. I'm having a hard time understanding when my components will be released though. Here is the basics of my model:
Singleton -> Singleton Typed Factory -> Transient Objects
If I release the first singleton in this chain will all the transient objects created by the typed factory be released? Is there any API call I can make to check if this is the case? I can't find any comprehensive API documentation on the Castle Windsor website. The documentation I did find just doesn't seem clear to me.
Edit: My problem boils down to two main questions.
- If I have a singleton object (A) that depends on a singleton typed factory (B) and I release singleton A will that actually release B? The blog post mentioned in the answer below says that calls to release on singleton objects are ignored, so my assumption is no it will not be released.
- If I have a singleton typed factory that is used by multiple web requests simultaneously to create transient objects and is released by one of the web requests, will all the transient objects be released, whether they were created from that web request or not? It almost seems like making typed factories per web request or transient lifestyle is better.