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

Explain what is the difference between view and partial view?

0 Answers  


How can I tell what .net framework is installed?

0 Answers  


What is the difference between tempdata and viewbag?

0 Answers  


What is strong name and which tool is used for this ?

4 Answers   Accenture, BirlaSoft,


Can you set the unlimited length for "maxjsonlength" property in config?

0 Answers  


Explain .Net Framework? Why we use it?

0 Answers   MaxSolPro,


What is entitytype? : Entity framework

0 Answers  


mention in what all scenarios entity framework can be applicable?

0 Answers   Microsoft,


How we can call a JavaScript function on the change of a Dropdown List in ASP.Net MVC?

0 Answers  


What is the difference between partial and renderpartial?

0 Answers  


What is net framework 3.0 ?

0 Answers  


sql related question (outer join, left, right etc) array vs hashtable CRL sqldatareader vs dataset what is WPF, WCF, compare to WinForms Webservices Asp.net MVC vs WebForms?

0 Answers   Avanade,


Categories