Ferozeh dot Com
Expert advice on tech interviews !
about ferozeh

Ferozeh

Similar Questions


big table deletion SQL


c# using statement


finalize dispose close

Question

Difficulty Level: 3

  • List some of the drawbacks cons downsides of using a Garbage Collector in .NET CLR ?

Solution

Explanation Quality:2

The Garbage Collector absolves the developer of the need to keep track of memory management as is the case in unmanaged environments such as C/C++. Every application has a set of roots, which are nothing but pointers to objects in the managed heap. Note that in .Net all resources are allocated on the managed heap. Variables of reference types are only considered roots. Value type variables are never considered roots. It is through the tracking of roots that the garbage collector is able to keep track of what to delete and what to keep.




Previous