Why doesn't the .NET runtime offer deterministic destruction
Answer Posted / kirti
Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are ready to be destroyed and the memory reclaimed. The implication of this algorithm is that the runtime doesn't get notified immediately when the final reference on an object goes away - it only finds out during the next sweep of the heap.
Futhermore, this type of algorithm works best by performing the garbage collection sweep as rarely as possible. Normally heap exhaustion is the trigger for a collection sweep.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is needed for running an application built on winfx on the .net framework 3.0?
What is edm designer? : Entity framework
Describe the gac in the .net framework.
What are the sub types of ActionResult?
How does the 'page lifecycle' of asp.net mvc works?
Asp.net mvc application, makes use of settings at 2 places for routing to work correctly. What are these 2 places?
What operating systems will the .net framework 3.0 be available for?
What is a view engine?
How does the .net framework 3.0 relate to the .net framework 2.0?
What is NonActionAttribute ?
Explain ASP.NET MVC Identity and Security?
What are Code Blocks in Views?
When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (xss) attacks?
What is the difference between model and entity?
Can I add mvc testcases in visual studio express?