Memory not being returned after function python call
- by Dan
I've got a function which does a parse of a sentence by building up a big chart. For some reason, Python holds on to whatever memory was allocated during that function call. That is, I do
best = translate(sentence, grammar)
and somehow my memory goes up and stays up.
Here is the function:
from string import join
from heapq import nsmallest,…