show-notice
hide-notice

Sunday 7 July 2013

What is garbage collection?


Introduction
 

This Arttical i will explain What is garbage collection?




Description

Garbage collection is a CLR feature which automatically manages memory. Programmers forget
to release the objects while coding ..... Laziness (Remember in VB6 where one of the good
practices is to set object to nothing). CLR automatically releases objects when they are no longer in
use and refernced. CLR runs on non-deterministic to see the unused objects and cleans them. One
side effect of this non-deterministic feature is that we cannot assume an object is destroyed when
it goes out of the scope of a function. Therefore, we should not put code into a class destructor
to release resources.


SHARE THIS POST   

0 comments :

Post a Comment

Design by Gohilinfotech | www.gohilinfotech.blogspot.com