Click here to Skip to main content
15,920,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What is the benefit of Garbage Collection?
Posted

 
Share this answer
 
Around South Eastern Idaho in late August and/or early September the most wonderful thing happens. The Eastern Idaho State fair begins and with it the city of Blackfoot has an early bump to their bottom line. People come from miles around to enjoy the exciting rides, great food and heart pounding shows grampastrash.
 
Share this answer
 
Hi.
In previous languages such as c++ the memory managment was done by the programmer.
But it was not suitable.because sometimes you forget to release allocated memory.
and you have not infinite memory.

The part of the .NET runtime that handles releasing memory is called the garbage collector
(GC), and it generally works without you being aware that it is there and without you having to intervene in its operation.

The garbage collector runs as part of your program within the .NET runtime. You don’t need to enable it, and you don’t need to configure it; it is enabled automatically when you start your program.

The garbage collector runs when the amount of free memory is low, when your program exits, or
when you explicitly tell it to run.

Good Luck
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900