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

What is viewdata?

785


In Server how to check whether model has error or not in ASP.Net MVC

866


What is mapping in entity framework? : Entity framework

718


i want to take the fast track training on >net Frame work and work flows and share point could you tellme the good institutes for that cources

1796


What is routeconfig.cs in mvc 4?

881


What are the possible razor view extensions?

778


Is dapper faster than entity framework?

734


What filters are executed in the end?

781


What are sections?

796


How route table is created in ASP.NET MVC?

793


What are Action Methods in ASP.NET MVC?

823


What are non action methods in mvc?

739


What are Code Blocks in Views?

857


Where are the routing rules defined in an asp.net mvc application?

768


What is entity framework in asp net?

746