Basically I am not going to post all of the code here but I will provide a generic example. I have a class that has a function to run and create a large array of values. This array shouldn't be much bigger than 10MB from my estimates. Within the functions it makes new and modifies arrays that should be collected up after the functions within train run. They are not used elsewhere besides the returned tempArray which is put into the large array. This is repeated. The memory used just keeps growing and growing. Is there an issue with my code or a way around this. I have read here about memory leaks with the malloc in Linux: http://pushingtheweb.com/2010/06/python-and-tcmalloc/.

没有正确的解决方案

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top