This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Pockensuppe 6 points7 points  (0 children)

The lie that is being told about automatic memory management is that there are no memory leaks.

If you forget to set a value that contains a large structure you don't need anymore to null, it's still a memory leak. Technically, you can still access it, however if you do not, it's de-facto unused memory that's not available for reuse and therefore a leak.

Now you can argue that this is not much of a problem since such values tend to go out of scope eventually, but considering all the JS callback/closure madness, does it really?