News for hackers. Stuff that matters.
Re:A re-introduction to JavaScript by drinchev on Saturday May 09, 2015 @11:56AM (#9516726)
There's definitely no point to avoid them for IE. The point as I see it is that it should be avoided for every browser.

Indeed IE's users are having terrible experience anyway, but let's just don't push FF and Chrome to their memory limits, just because we don't care with our code.

One of the best parts when I develop client-side web-apps is the debugging and looking close what the garbage collector is doing. For example : I usually don't use `delete` keyword, since I know it might create a node that GC's can't clear.

Re:A re-introduction to JavaScript by xtrumanx on Saturday May 09, 2015 @12:40PM (#9516853)
Can you expand on what you said about the `delete` keyword implications with the GC? I've never heard of that issue.
Re:A re-introduction to JavaScript by Touche on Saturday May 09, 2015 @12:47PM (#9516874)
I haven't either, only that delete will cause code to be de-optimized.
Re:A re-introduction to JavaScript by CrystalGamma on Saturday May 09, 2015 @03:50PM (#9517470)
Its main purpose is deleting a property from an object, which is a pretty slow operation on modern JS engines. Unless some code tests for the existence of a property, setting it to null is a better idea.
Re:A re-introduction to JavaScript by tracker1 on Saturday May 09, 2015 @10:22PM (#9518517)
I'd suggest undefined over null if you want to effectively remove a property, since JSON.stringify won't serialize those properties... in an array, it will become null.

Though, I don't use delete much, I honestly don't worry about it much. In most contexts it's a bit of a premature optimization unless you are in a very low-level tool that will be used for example gaming, video or photo manipulation, there are probably better optimizations to make.

Re:A re-introduction to JavaScript by chris_wot on Saturday May 09, 2015 @02:03PM (#9517104)
I think it affected earlier versions of IE - Douglas Crockford detailed an issue here:

http://javascript.crockford.com/memory/leak.html

Re:A re-introduction to JavaScript by chris_wot on Sunday May 10, 2015 @03:03AM (#9519143)
What the hell is wrong with people today? I was hazarding a guess what was being referred to and I get down voted?