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.
by Jordan on Wed 28th Apr 2004 03:43 UTC

I have a couple big problems with garbage collectors.

They tend to run when memory is scarce. This makes them extremely poor neighbors when running on systems with other applications. In fact a good number of the performance problems I see with Java GUI apps is because they end up eating huge chunks of memory and cause the rest of my machine to start slowing down.

Worse, when they do run their collectors, they run them all at once which pegs your CPU and creates a noticeable hiccup in your application (and your machine). With traditional micro-managing, you spread your CPU cycles over the lifetime of your application.

Now that's not to say garbage collection isn't extremely handy, however I'd rather use it to debug my manual memory allocations. After all, the time spent running my applications is significantly longer than the time spent writing them.