I am relatively new to PyDSTool. I am doing some bifurcation analysis which is requiring me to perform quite a lot of runs of my ode system and continuations. I often hit a memory ceiling and the process crashes. 

I have tried to add calls to 'cleanupMemory()' in the Radau_ODESystem I am using, but I get the following error:

  File "/home/matt/PyDSTool/Generator/ODEsystem.py", line 433, in cleanupMemory
    if hasattr(gen, '_solver'):
NameError: global name 'gen' is not defined

Is there something obvious I am not doing?