Tuesday, 10 January 2012

Garbage Collection in .NET

The garbage collection is an inline program running in background to Windows applications. It is basically a mechanism to release the unreferenced objects from the memory. The ASP.NET developers no longer need to worry about the need to manage the life-cycle of the objects they create – the garbage collector will take care of them once the application has finished with them.

When a program creates an Object, the Object takes up the some chunk of the available memory. Later, when the program has no more references to that Object, the Objects’ memory becomes unreachable, but not freed as such. The Garbage collection inspects to see if there are any Objects that are no longer being used by the application. If such objects exist, then the memory used by these Objects can be reclaimed. So, these unreferenced Objects should be removed from memory, and then the other new Objects the developers create can find a place in the program.

In ASP.NET language, there is a provision that we can call Garbage Collector explicitly in the program by calling System.GC.Collect.

At SPEC INDIA, our trained team of ASP.NET developers is eager to take care of any custom requirement from our probable Clients and prospects from all over the globe. If you have any requirement or queries, feel free to drop an email at our id lead@spec-india.com, we will be happy to assist you.

No comments:

Post a Comment