<html>
<head>
<base href="http://fiji.sc/bugzilla/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:hinerm@gmail.com" title="Mark Hiner <hinerm@gmail.com>"> <span class="fn">Mark Hiner</span></a>
</span> changed
<a class="bz_bug_link
bz_status_CONFIRMED "
title="CONFIRMED - memory leak with python script"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1203">bug 1203</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEEDSINFO
</td>
<td>CONFIRMED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_CONFIRMED "
title="CONFIRMED - memory leak with python script"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1203#c13">Comment # 13</a>
on <a class="bz_bug_link
bz_status_CONFIRMED "
title="CONFIRMED - memory leak with python script"
href="http://fiji.sc/bugzilla/show_bug.cgi?id=1203">bug 1203</a>
from <span class="vcard"><a class="email" href="mailto:hinerm@gmail.com" title="Mark Hiner <hinerm@gmail.com>"> <span class="fn">Mark Hiner</span></a>
</span></b>
<pre>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]
<a href="http://python.6.x6.nabble.com/Cleaning-up-PythonInterpreter-object-td1777184.html">http://python.6.x6.nabble.com/Cleaning-up-PythonInterpreter-object-td1777184.html</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>