5 ms·
Most people who write C professionally have no trouble doing this, but memory leaks still occur. It's easy to miscommunicate what part of the code manages what
by yoklov 12y ago
Most people who write C professionally have no trouble doing this, but memory leaks still occur.
It's easy to miscommunicate what part of the code manages what memory if you're working in a group, not to mention just normal human error. It's very easy to accidentally forget to free something, especially when you're on a tight schedule or distracted. I mean, how many times have you wondered 'how did this ever work' when looking through old code you wrote?
That said, most of these problems are significantly lessened by C++ (though it's obviously not a panacea).