That crazy GC Heap

If you’re like me, the whole idea of a garbage collected heap seems, at first, contrarian
to the C++ coder’s mentality.  As a breed, we’d prefer to handle memory (de-)allocations
completely on our own.  But if you’re like me, and you’ve spent hours trying
to figure out where that memory hole is coming from, then maybe the idea of a GC has
looked good, from time to time.

Coding can take on a slightly different feel when you’re working with a GC. 
You may feel a little sloppy, at first.  C++ programmers have been conditioned to
cover all their bases, watch their backs, and in general be as careful as they possibly
can be.  Coding with a GC frees you from some of these constraints, so it can
feel a little “loosey-goosey” at first.

But in my opinion, having a GC is mighty nice.  It’s like visiting a hotel. 
Don’t make the bed, don’t scrub the toilet; that’s what the cleaning staff is for. 
Just enjoy the nice, clean room.  Having a GC do the dirty work for you frees
you up to concentrate on more important details.

Comments (1)