Many thanks Jeff. I really appreciate your effort to solve the problem.<br>I try what you syggest and post the results.<br><br>If i use global vtk object, should i use vtkGlobalJavaHash.DeleteAll() in order to delete them? <br>
Or the system frees the memory automatically when the program exits?<br><br>Baliki<br><br><div class="gmail_quote">2009/11/17 Jeff Baumes <span dir="ltr"><<a href="mailto:jeff.baumes@kitware.com">jeff.baumes@kitware.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="im">On Tue, Nov 17, 2009 at 9:42 AM, Baliki baliki <<a href="mailto:balikivtk@gmail.com">balikivtk@gmail.com</a>> wrote:<br>
<br>
</div>Ok. You really need to keep some VTK object stored externally. It's an<br>
artifact of the wrapping system, but not a bug that can be fixed (at<br>
least to my knowledge). There needs to always be a VTK object (or set<br>
of objects) that is not out-of-scope that will keep references to<br>
everything, otherwise all VTK objects will be deleted on garbage<br>
collection. In your case just storing the render window at the class<br>
level should do the trick.<br>
<br>
Not sure why this would not be an issue with a different reader.<br>
Perhaps the other reader uses less memory and Java does not<br>
garbage-collect as soon, so it appears to work a long time?<br>
<font color="#888888"><br>
Jeff<br>
</font></blockquote></div><br>