release memory used in python function composition -


i dealing large arrays , huge number of loops, while script failed because of memory limit or bus error.

now want optimize code little bit, release memory using del , gc.collect() as possible @ each loop. since i've used bunch of nested functions, such result = functiona(functionb(data, time)), wondering how can release memory in implementation?

basically, want have same effect of doing following:

b = functionb(data, time) result = functiona(b) del b; gc.collect() 

any suggestions appreciated!


Comments