I just wash my feet with the Ninject.Mvc3 NuGet package, and I wonder how long the created object lasts.
InRequestScope pretty clear: every object created in this area lives as long as the web server processes a specific web request. (To be pedantic, objects live as long as the HttpContext.Current object does)
But how long does the InSingletonScope ? The documentation states that as long as the Ninject kernel itself does this, which completes the static NinjectWebCommon class. The best guess I have made so far is that the kernel lives as long as the webapp is running on the server - until the server is working, until the application is manually reloaded in IIS or updated, objects are in scope .
I am curious because I am tempted to have some Data Accessors containing read-only data dictionaries like Singleton Scope, and I am wondering if this is a good idea or memory leak when planning.
source share