'Does gc.collect really release memory?

I am trying to release memory using gc.collect(). But I do not really understand how it works. For example:

enter image description here

Before I run del and gc, the used memory is 58g. After running them, the used memory is still 58. It looks that no memory has been released. I sense gc is different than shutting down python and starting again, which actually release memory.

So I am wondering how to actually release the memory so that I can load other data?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source