Memory usage with matplotlib

This question is related to memory usage (and garbage collection) with matplotlib.
Some very simple examples are shown below. These results were obtained in a Windows XP
box but some similar results were also observed under Linux. First column shows the memory
allocated just after the execution of the command shown in the second column.

Test #1
Mem Usage Action
3152K Python Command Line Opened
15700K from pylab import *
15700K a = arange(0, 10)
19820K figure(1)
19988K plot(a, a)
22288K show()
20100K Memory usage after closing graphic window

Test #2
Mem Usage Action
3148K Python Command Line Opened
15700K from pylab import *
15700K a = arange(0, 10)
19820K figure(1)
19988K plot(a, a)
22288K show()
20100K Memory usage after closing graphic window

Test #3
Mem Usage Action
3148K Python Command Line Opened
15700K from pylab import *
19808K figure(1)
19812K a = arange(0, 10)
19980K plot(a, a)
22272K show()
20112K Memory usage after closing graphic window

The question is: "why isn't the memory collected after closing the figure?". The real
program I developed builds 5~15 graphic windows and the required memory is very large.

Prof. Clovis Goldemberg
University of São Paulo