title: How to delete javascript canvas
body: <p>I want to have a bunch of objects, let's say:</p>
  
  <pre><code>function Block() {
    this.canvas;
  }
  
  blocks = [];
  </code></pre>
  
  <p>And I will at occasions specify:</p>
  
  <pre><code>block[x] = new Block();
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>block.canvas = document.createElement('canvas');
  </code></pre>
  
  <p>But I will also want to delete this new canvas to free up memory sometimes.  Do I just need to do:</p>
  
  <pre><code>block.canvas = null; (or whatever the appropriate method is)
  </code></pre>
  
  <p>And then javascript will free up the memory at some stage?  Or is there an explicit way to delete the object and free up the memory?</p>
  
  <p>Thanks!</p>