I come from the StructureMap world, where it is never necessary to release resolved transient objects.
I see that Windsor by defauly keeps track of any resolved transient objects and therefore prevents them from being garbage collected until they are released (if they ever are released).
I found NoTrackingReleasePolicy in the docs, but it's usage is discouraged.
Having to release any transient objects seems like going back in time to me.
I will use NoTrackingReleasePolicy in my app.
What trouble am I getting into by doing this? Or in other words why would I want to release objects manually instead of having the garbage collector handle that for me?
Just so that question doesn't stay unanswered:
The matter is explained in the blogpost linked by @mauricio scheffer in the comments.
Basically using NoTrackingReleasePolicy is going to lead to a lot of subtle problems, and if you architect your app right, with the default release policy, you don't have to worry about calling release explicitly in your code anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With