[vtkusers] VTK and Java Wrappers

Denis Barbier bouzim at gmail.com
Wed Mar 10 02:05:15 EST 2010


On 2010/3/9 Lars Matthäus wrote:
> Dear Jeff and all,
>
> I tested the two solutions proposed in Denis' git branches for two
> months now. I never had a problem with the global lock (Solution 1), but
> one or two non-reproducible crashes with Solution 2. Also, I did not
> experience any performance problems with neither solution. I would
> therefore vote for Solution 1 to be integrated in vtk 5.6.
>
> But in any case, I'd suggest some stress tests before deciding on the
> issue. It would be good to have an "eternal" loop continuously creating
> vtk objects and let the java garbage collector take care of the memory,
> i.e. of deleting the objects. Ideally, the objects would be
> * simple vtk objects (created directly using native calls like
> vtkPolyData p = new vtkPolyData()),
> * java objects containing vtk objects (implement a small class that has
> vtk objects as members and initialize them),
> * vtk objects containing other vtk objects (e.g. vtkAssembley).
>
> Further, it might be interesting to see what happens if the objects are
> created on different threads.
>
> What do you think?

This is a very good idea; I would add another item
  * Mix garbage collection and explicit calls to Delete().

Denis



More information about the vtkusers mailing list