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
Does razor engine supports for tdd?
Name a few different return types of a controller action method?
Is .net framework 4.8 the last version?
Can you use Razor code in Javascript in ASP.Net MVC?
What is code first? : Entity framework
what is complex type?
Explain Model, view and Controllers in Asp.Net MVC?
Which is the root namespace for fundamental types in .net framework?
Why is entity framework used?
How we can handle the exception at controller level in ASP.Net MVC?
Can you explain renderbody and renderpage in asp.net mvc?
What are the options can be configured in AJAX helpers?
mention what is the key advantage of using entity framework or ef?
What is meant by viewdata?
What are the levels at which filters can be applied in an asp.net mvc application?