Is there something like memory friendly scripting in JavaScript? Certain principles I should be aware of? I am asking this because I have a site where a #div gets filled with lots of data and I do this with a primitive .innerHTML = i_hold_lots_of_data; I wonder if a .innerHTML = ''; has the same effect as a free() in C?
So my question could be narrowed down to this: Are there best practises for handling huge strings in JavaScript as concerns memory management?