> (The Boehm GC, via a triumph of inspired hackery, manages to do the first
> without source code changes: but it's computationally expensive as GCs go,
> not type-accurate, and can sometimes leave extra garbage lying around. I
> don't really understand why more C programs don't use the Boehm GC, though
With a sales pitch like that, who wouldn't use it? :P
Anyway, I think RAII is a better approach to memory management than GC for high-performance applications. It's deterministic and has very little run-time cost. The only disadvantage is that it doesn't exist in C, but it's supported by all modern languages except the ones that have gone the builtin-GC route.