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 the .net framework and how does it work?
Explain the advantages and disadvantages of ASP.Net MVC over ASP.NET?
what is entity framework?
Is dapper better than entity framework?
What is the need of Action Filters in ASP.Net MVC
Explain the methods used to render the views in ASP.Net MVC?
What is iobjectset? : Entity framework
Is .net framework 4.8 the last version?
which are the key concepts of entity data model?
What is the purpose of a web form?
How can I return string result from action in asp.net mvc?
What is the difference between viewbag and viewdata in asp.net mvc?
Can I remove .net framework?
What is a razor file?
How the ‘page lifecycle’ of ASP.Net MVC does works?