Possible Duplicate:
Garbage Collection in C++ — why?
Hi, I read few articles about Garbage Collectors, and still there is one thing I just don´t understand – why use garbage collection?
I will try to explain my thoughts:
Garbage Collector should release dynamically allocated memory back to system in case there is no need for it, right? So, if you write program in language C, you know wheather you need some piece of memory, so if don´t, you can simply destroy it.
So, why to use GC, when all you need to do is actually just be wise with memory allocation/deallocation? Or am I missing something? Thanks.
To be more productive. In other words, the programmer can focus on writing the bits that is unique for his particular problem.