3 ms·
I'm the author of the original post. It's not difficult. Get a good debugger, and you're job is easy. Use a memory allocation tracker while you debug, then s
by scumola 17y ago
I'm the author of the original post. It's not difficult. Get a good debugger, and you're job is easy. Use a memory allocation tracker while you debug, then switch back when you're done. It's not hard, just takes a little more time. Don't be lazy. Use ccmalloc: No recompilation is needed to use ccmalloc; simply link it with -lccmalloc -ldl or ccmalloc.o -ldl When you've found and fixed your leak, stop linking with the library and you're done. Why switch to a GC architecture because you don't want to do something easy like this?
- foldr 17y ago> It's not difficult. Get a good debugger, and you're job is easy. Easy for a sysadmin to say! How many web apps have you written in C lately? > It's not hard, just takes a little more time Yeah -- just long enough to go out of business ;)
- pmccool 17y agoI wasn't just talking about memory leaks. Memory allocation in C is a rich source of bugs. Even assuming they are "easy to fix", that's still a poor second to "never happened in the first place". GC isn't free, sure, but it has definite advantages.