title: What does "del" do exactly?
body: <p>Here is my code:</p>
  
  <pre><code>from memory_profiler import profile
  
  @profile
  def mess_with_memory():
      huge_list = range(20000000)
      del huge_list
      print "why this kolaveri di?"
  </code></pre>
  
  <p>This is what the output is, when I ran it from interpreter:</p>
  
  <h1>    Line #    Mem usage    Increment   Line Contents</h1>
  
  <pre><code> 3      7.0 MiB      0.0 MiB   @profile
   4                             def mess_with_memory():
   5                             
   6    628.5 MiB    621.5 MiB       huge_list = range(20000000)
   7    476.0 MiB   -152.6 MiB       del huge_list
   8    476.0 MiB      0.0 MiB       print "why this kolaveri di"
  </code></pre>
  
  <p>If you notice the output, creating the huge list consumed 621.5 MB while deleting it just freed up 152.6 MB. When i checked the <a href="http://docs.python.org/2/tutorial/classes.html" rel="noreferrer">docs</a>, I found the below statement:</p>
  
  <pre><code>the statement del x removes the binding of x from the namespace referenced by the local scope
  </code></pre>
  
  <p>So I guess, it didn't delete the object itself, but just unbind it. <strong>But, what did it do in unbinding that it freed up so much of space(152.6 MB)</strong>. Can somebody please take the pain to explain me what is going on here?</p>