L
larax
Hi
I'm creating now a site which is using heavly AJAX and what comes with
it, many Javascript functions are used. However many of these functions
are used only once (mainly to load new content by sending request to
server and by using DOM editing site content based on the response). So
keeping these functions in memory, while new content with new functions
is loaded, would be just wasting of memory.
And here goes my question - is there any way to delete Javascript
functions or free memory used by them? I've tried with "delete"
operator but it doesn't work with functions. I thinked also about
setting the function name to "null", but I'm not sure if Javascript
will automaticlly free memory.
Thanks for any advices.
I'm creating now a site which is using heavly AJAX and what comes with
it, many Javascript functions are used. However many of these functions
are used only once (mainly to load new content by sending request to
server and by using DOM editing site content based on the response). So
keeping these functions in memory, while new content with new functions
is loaded, would be just wasting of memory.
And here goes my question - is there any way to delete Javascript
functions or free memory used by them? I've tried with "delete"
operator but it doesn't work with functions. I thinked also about
setting the function name to "null", but I'm not sure if Javascript
will automaticlly free memory.
Thanks for any advices.