If I have a self-destroying function
function tempFunc() {
//do some stuff, then...
tempFunc = function() {return;}
}
or
function tempFunc() {
//do some stuff, then...
delete tempFunc;
}
What happens to the original code of tempFunc? Is it held in memory anywhere? How is the situation changed if the function leaves behind something a bit more permanent e.g. creates an object which has access to variables contained within the function's closure.