What is GC (Garbage Collection) and how it works

Answer Posted / kirti

One of the good features of the CLR is Garbage Collection, which runs in the background collecting unused object references, freeing us from having to ensure we always destroy them. In reality the time difference between you releasing the object instance and it being garbage collected is likely to be very small, since the GC is always running.

[The process of transitively tracing through all pointers to actively used objects in order to locate all objects that can be referenced, and then arranging to reuse any heap memory that was not found during this trace. The common language runtime garbage collector also compacts the memory that is in use to reduce the working space needed for the heap.]

Heap:

A portion of memory reserved for a program to use for the temporary storage of data structures whose existence or size cannot be determined until the program is running.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How route table is created in ASP.NET MVC?

597


What is the difference between viewbag and viewdata in asp.net mvc?

618


why DotNetFramework is included in building a software

2213


mention what is csdl, ssdl and msl sections in an edmx file?

575


Explain the new features 3.5 framework against with the tool?

503






what is client wins and store wins mode in entity framework concurrency?

649


What is objectcontext? : Entity framework

594


Difference between ASP.NET MVC and ASP.NET WebForms?

566


What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?

587


What is the use of web api ? Why web api needed, if you have already restful services using wcf ?

546


Explain the difference between viewbag and viewdata in mvc?

542


What are the versions of .net framework?

537


Define the core components of an ASP.NET MVC application?

575


If we write any code for DataGrid methods, what is the access specifier used for that methods in the code behind file and why?

1977


Explain peek method in tempdata in asp.net mvc?

587