开发者

How do I tell Castle Inversion of Control that I want a new instance of a singleton object without restarting the app?

开发者 https://www.devze.com 2022-12-24 06:20 出处:网络
At a certain point, during the running of my app, I want Castle.Windsor to release everything cached in memory. Is this impossib开发者_开发知识库le for a singleton object?Use nested container for that

At a certain point, during the running of my app, I want Castle.Windsor to release everything cached in memory. Is this impossib开发者_开发知识库le for a singleton object?


Use nested container for that, register singleton in the nested container and it will get released. But why are you doing it in the first place?


You don't want a singleton, you want a Custom LifeStyle


I was trying to get around an unrelated problem by doing this. It is not the solution. Thanks everyone.

0

精彩评论

暂无评论...
验证码 换一张
取 消