3 ms·
The problem is that automatic memory management means to some newcomers that you don't have to worry about it. Which is not true at all. These newcomers may ha
by prerok 2y ago
The problem is that automatic memory management means to some newcomers that you don't have to worry about it. Which is not true at all.
These newcomers may have heard about it, may even understand it at some level, but it's not in their rote knowledge. GC is great if you know that every allocation you do is expensive and that you know that it will be taken care of properly, because it will be short-lived.
But I have seen many cases where people just don't have it in their conciousness why allocating huge arrays is a problem or why allocating a new Character object for every single character in a string might be bad. As soon as I point it out, they get it, but it's not like they thought of it while writing their algorithm.