Why doesn't the .NET runtime offer deterministic destruction



Why doesn't the .NET runtime offer deterministic destruction..

Answer / 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

More Dot Net Framework Interview Questions

What is namespace used for loading assemblies at run time and name the methods?

2 Answers  


How to Create an Intranet Site Using ASP.NET MVC?

0 Answers  


What are multicast delegates ? give me an example

1 Answers  


explain lazy loading, eager loading, and explicit loading?

0 Answers   Microsoft,


Explain what languages does the .net framework support?

0 Answers  






what is Assemble

4 Answers   Microsoft,


Is .NET a runtime service or a development platform?

1 Answers  


Explain the advantages of dependency injection (di) in asp.net mvc?

0 Answers  


How do you convert a string into an integer in .NET

1 Answers  


Name a few different return types of a controller action method?

0 Answers  


What are the advantages of asp.net mvc?

0 Answers  


Can we create the web service in windows application?

3 Answers  


Categories