Ninject doesn't call Dispose on objects when out of scope?

Ninject will dispose your objects as soon as the request object is collected by the GC. But normally this takes some time. But there is a way to force early disposal after the request ended.

The best way is to use Ninject.Web. MVC http://www.planetgeek.ch/2010/11/13/official-ninject-mvc-extension-gets-support-for-mvc3 instead of implementing your own ControllerFactory. The other way is to configure your application to use the OnePerRequestModule.

I'm not sure why you're surprised. I would be surprised if Ninject DID automatically call Dispose on objects. Making such assumptions would be dangerous, or at least unreliable.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions