Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is garbage collection?

Answer Posted / stanly jose

Ofcourse, Garbage Collection is done for the memory
utilization (making use of memory space which is allocated
to the unused objects).
And this Garbage Collection is autometically done by the
CLR. Still we can also implicity for the CLR to collect the
unused memory allocated to unused objects. But that is not
at all necessary.

When a program is loaded into memory, it is organized into
three areas of memory, called segments: the text segment,
stack segment, and heap segment.
So the compiled code will reside in the text segment.
the variables like string, int ect..(value types) will
reside in stack segment.
the objects like class(reference type) will reside in the
heap segment.
So when a new object is created the Garbage Collector will
look unused objects and it will free them from the heap. so
that the new object can reuse the memory allocated to the
unused object.

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we extend static class in c#?

959


what is scope of a protected internal member variable of a c# class

1059


What is extension method in c sharp?

946


What do you mean by “finalize” and “finally” methods in c#?

948


State two different types of access modifiers.

1063


Is string a primitive data type in c#?

909


What is static class in C#?

1068


When do you generally use a class over a struct?

1009


How does bubble sort work?

954


What is an interface class in c#?

1169


Is c# and c same?

937


What is a jagged array?

964


What is the base class for array types?

1086


What is desktop GUI application?

1022


If you define a user defined data type by using the struct keyword, is it a value type or reference type?

933