Coming from C++ it is hard grained into my mind that everytime I call new I call delete. In JavaScript I find myself calling new occasionally in my code but (hoping) the garbage collection functionality in the browser will take care of the mess for me.
I don’t like this – is there a delete method in JavaScript and is how I use it different from in C++?
Thanks.
1 Answer