Linked by Zachary Pinter on Tue 27th Apr 2004 17:09 UTC
General Development Garbage collection (GC) is a technology that frees programmers from the hassle of explicitly managing memory allocation for every object they create. Traditionally, the benefit of this automation has come at the cost of significant overhead. However, more efficient algorithms and techniques, coupled with the increased computational power of computers have made the overhead negligible for all but the most extreme situations.
Permalink for comment
To read all comments associated with this story, please click here.
@Esben Mose Hansen
by Rayiner Hashem on Wed 28th Apr 2004 12:05 UTC

Conservative collectors do not guarantee determinite deallocation. Conservative collectors simply let you use GC with a non-cooperative language, by assuming that if a particular word looks like a pointer (regardless of whether it may just be an integer), it should be treated as a pointer into the heap. This is not a greatest way to do GC, but it performs pretty well in practice.

What you're thinking of is something like boost::shared_ptr, or one of the other resource-managing templates. They are good within the confines of C++, but they are much more cumbersome to program (C++ really doesn't make the wrapper transparent except for at invocation), and perform poorly compared to a real GC.