littlefaerie
New Member
If for instance, 3 requests are made to the server, does that mean 3 instances of the web application are put into memory? What if you used a locked singleton or cached a class so each time it checks to see if the object exists or not and creates the object if it doesn't exist, does that mean that the object is cached for each request? or is it cached once and reused for each request? If I locked a singleton, does that mean The object using the singleton is created once and each request uses the same object? or does it mean the object is created using the singleton for each request but is not created again by the same thread? If I used \[code\]System.Web.HttpRuntime.Cache["key"];\[/code\]to cache a 1 mb object and 10 requests are made, am I using up 10 mb's of memory on the server? if I created a new object using a singleton... what occurs in terms of threading and memory allocation?