Why would this little python code cause memory leak?
<pre><code>def fun():
    n = 300
    features = [[0 for i in range(0, n)] for j in range(0, n)]  
    for i in range(n):
        for j in range(i, n):
            features[i][j] = [np.random.random((300,300))]
    return

for i in range(10000):
    fun()
</code></pre>

<p>Featues is only local variables which should be collect after fun returns. Why this cause memory leak?</p>