If I created a huge list/array, say
a=range(1000000000)
or
a=numpy.ones(100000000)
then I re-assign a as:
a=1
After this re-assignment, will the previous huge list or array be automatically deleted, or, there is a potential memory eat-up if its inside a loop?
It will garbage collect as normal, it might take a little bit to be reaped. But it will not memory leak (or it should not, if it does then there’s a bug in the numpy module which should be reported.)