The run time will maintain a service called as garbage collector. this service will take care of deal locating memory corresponding to objects. it works as a thread with least priority. When application demands for memory the runtime will take care of setting the high priority for the garbage collector, so that it will be called for execution and memory will be released. the programmer can make a call to garbage collector by using GC class in system name space.