Hacker News new | ask | show | jobs
by tptacek 1729 days ago
Plenty of C programs do the equivalent of ioutil.ReadAll; it's not a GC thing.
1 comments

"Leak everything because we can get away with it here" is a fine memory management strategy. "Why does my program keep getting killed?" isn't.
This has nothing to do with leaking (nothing "leaked"; it's a garbage-collected runtime). It's about memory pressure, which, I promise you, is a very real perf problem in C programs, and why we memory profile them. The difference between incremental and one-shot reads is not a GC vs. non-GC thing.