title: In jQuery how delete variables and functions
body: <p>I've got a function in jQuery, eg.</p>
  
  <pre><code>var asd;
  
  function dosomething(){
      for (i=0;i&lt;=1000000;i++)
      {
      asd[i] = "(2^i)";
      }
  }
  </code></pre>
  
  <p>How can i unset the variables after the function?  </p>
  
  <p><code>delete $asd;</code></p>
  
  <p>With this, i can clear the variable from the memory.  </p>
  
  <p>But can i reach the function's destructor in jQuery and how can I unset the whole function in the function's destructor?</p>
  
  <p><strong>THE WHY</strong></p>
  
  <p>The function and all the global variables are in the memory after running a script.<br>
  If i run something by the console, after the dom ready - since the all variables are still in the memory - the program will run.</p>
  
  <p>So I'd like to clear the variables on the function's desctructor, then reset the function, or make it to null. </p>
  
  <p>Because it will flush the whole script from the memory, so my page will be faster. Imagine a bit larger data structure than a single function, like 100 functions and 800 global variables. After the shown, i don't need the variables anymore.</p>