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...

How does Garbage collector(GC) works in .net

Answer Posted / pradip kumar

Basically GC.Collect will work only if the memeory space is
less then required space.

You can force it to run by System.GC.Collect();

How it works :
Through 'Genaration Number' . CLR assigned this number for
each object so that GC can identify which one to be removed.
It can be 0,1,2 based upoon the
old/new/referenced/dereferenced criteria.
To check the space before and after GC.Collect() method use
GC.GetTotalMemory(true) method.


Regards,
Pradip kr Sen
Hyderabad

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differentiate between Server.Transfer and Response.Redirect with functionality? Why we can choose one over the other?

1188


What is the maximum amount of memory any single process on windows can address?

1037


What is fulltrust?

1041


How can we add an event handler for a ASP.NET function executed on MouseOver for a certain button.

1166


What do you mean by authorization?

946


How you can return View from ASP.NET Web API method?

1017


If we remove web.config or machine.config from the application then, is this application will works?

1018


What is postback in asp net?

1054


What are server-side comments in ASP.NET?

951


What is autopostback true?

1072


How to unit test Web API?

1213


What is caching in asp.net?

1014


What is the difference between “Web.config” and “Machine.Config”?

1139


What tags do you need to add within the asp:datagrid tags to bind columns manually? Give an example.

1040


How many types of session state management options available in asp.net?

1050