[ImageJ-bugs] [Bug 1203] memory leak with python script

bugzilla at fiji.sc bugzilla at fiji.sc
Mon Dec 14 12:38:03 CST 2015


http://fiji.sc/bugzilla/show_bug.cgi?id=1203

Mark Hiner <hinerm at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDSINFO                   |CONFIRMED

--- Comment #13 from Mark Hiner <hinerm at gmail.com> ---
It's definitely an issue with our implementation of the jython script language.
The python environment is not cleaned up after running a script - and in fact
there is code that relies on the environment not being cleaned up.

You can hack it right now and effectively "force" the scope of the variables to
be respected, by explicitly setting them to None before your script ends.

e.g.:

   inputIp = inputImp.getProcessor()
   #... do some stuff with the IP...
   inputIp = None

will ensure the image processor doesn't stick around. But that is, of course,
terrible.

I've been looking at options for cleaning up the python environment[1] but the
timing of when to do so is tricky.

I'll keep trying...


[1]
http://python.6.x6.nabble.com/Cleaning-up-PythonInterpreter-object-td1777184.html

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-bugs/attachments/20151214/99da180b/attachment.html>


More information about the Imagej-bugs mailing list