title: Matplotlib doesn't release memory after savefig and close()
body: <p>I have a piece of code that works fine looping once or twice but eventually it builds up memory. I tried to locate the memory leakage with <code>memory_profiler</code> and this is the result:</p>
  
  <pre><code>row_nr    Memory_usage    Memory_diff    row_text
   470     52.699 MiB     0.000 MiB      ax.axis('off')
   471     167.504 MiB    114.805 MiB    fig.savefig('figname.png', dpi=600)
   472     167.504 MiB    0.000 MiB      fig.clf()
   473     109.711 MiB    -57.793 MiB    plt.close()
   474     109.711 MiB    0.000 MiB      gc.collect()`
  </code></pre>
  
  <p>I created the figure like this:
  <code>fig, ax = plt.subplots()</code></p>
  
  <p>Any suggestion where the 109 - 52 = 57 MiB went?</p>
  
  <p>I am using python 3.3.</p>