ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
ReleaseController in WindsorController Factory
Title:
B
I
{code}
?
HI there Was doing some reading on Windsor. See that the ProDinner application registers controller as transient and that you are missing this. public override void ReleaseController(IController controller) { container.Release(controller); } If it were perwebrequest then you are not responsible as far as I understand it. Also, why the mixture of the two. Transient and Perwebrequest?
Save Changes
Cancel
gotstu
asked at 01 May 2014
Thanks for noticing, controllers are expected to be transient, have you had any memory leaks problems because of this ?
at 01 May 2014
Omu
Not that I have noticed but my application is not launched yet to all so the number of users is low. I am scratching my head at how to test for this. To actually see the memory go up. I imagine your test would have to simulate thousands of controller requests?
at 01 May 2014
gotstu
this is the code of DefaultControllerFactory from mvc source: public virtual void ReleaseController(IController controller) { IDisposable disposable = controller as IDisposable; if (disposable != null) { disposable.Dispose(); } } think you won't have any memory problems, you could call a controller's action thousands of times with something like foreach { @Html.Action("Action1")} in a view
at 01 May 2014
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK