I have this python module that imports many other modules. On monitoring the vm usage of the module, I see the usage continuously growing. I tried to go through the whole code and assigned None to the objects\variables whereever possible. But I suspect there still could be something that is not freeing up the memory. Is there a way (through some 3rd party module or something) to view undisposed objects or their memory consumption?
Thanks!!
解决方案
Check out How do I profile memory usage in Python? and Which Python memory profiler is recommended?. You need to dig into the docs, but those tools will allow you to breakdown memory usage by module.