manual memory management

Brad Roberts braddr at slice-2.puremagic.com
Mon Jan 7 18:23:00 PST 2013


On Tue, 8 Jan 2013, Rob T wrote:

> I am not actually against the use of the GC, I was only wondering if it could
> be fully removed. I too did not at first agree with the GC concept, thinking
> the same things you mention. I still have to consider performance issues
> caused by the GC, but the advantage is that I can do things that before I
> would not even bother attempting because the cost was too high. The way I
> program has changed for the better, there's no doubt about it.

There's some issues that can rightfully be termed "caused by the GC", but 
most of the performance issues are probably better labled "agregious use 
of short lived allocations", which cost performance regardless of how 
memory is managed.  The key difference being that in manual management the 
impact is spread out and in periodic garbage collection it's batched up.

My primary point being, blaming the GC when it's the application style 
that generates enough garbage to result in wanting to blame the GC for the 
performance cost is misplaced blame.

My 2 cents,
Brad


More information about the Digitalmars-d mailing list