Memory never released when using Python classes and numpy -


basically not going post of code here provide generic example. have class has function run , create large array of values. array shouldn't bigger 10mb estimates. within functions makes new , modifies arrays should collected after functions within train run. not used elsewhere besides returned temparray put large array. repeated. memory used keeps growing , growing. there issue code or way around this. have read here memory leaks malloc in linux: http://pushingtheweb.com/2010/06/python-and-tcmalloc/.

what trying do?

temp = self.largearray = zeros((1000,1000,10,20)) y in temp.size:     x in temp1.size:         self.largearray[x,y] = train() 

temp.size equals 200,000,000. how can store largearray[x,y] if second dimension of array 1000?


Comments

Popular posts from this blog

Cursor error with postgresql, pgpool and php -

delphi - ESC/P programming! -

c++ - error: use of deleted function -