[vtkusers] memory problems with vtk+java
Denis Barbier
bouzim at gmail.com
Thu Nov 19 04:40:00 EST 2009
On 2009/11/18 Jeff Baumes wrote:
[...]
> You normally do not need to call Delete() on your VTK Java objects, in
> fact this could be a dangerous practice. vtkGlobalJavaHash.DeleteAll()
> can be used on exit, which will delete all your VTK objects, or at
> least attempt to.
Your answer looks pretty odd to me; our experience with VTK+Java is
very different, we had crashes (similar to those mentioned by Baliki
baliki -Cc'ed- in another thread) when rendering. We fixed them by
adding explicit calls to Delete() on objects from vtk/Rendering/,
after patching VTK as described in
http://www.vtk.org/Bug/view.php?id=8942
Unfortunately we were not able to produce a small test case, and thus
could not fully debug this problem. We believe that it is caused by
threading issues with Java garbage collector, see comment in
Common/vtkJavaAwt.h about Java_vtk_vtkPanel_Lock.
Denis
More information about the vtkusers
mailing list