[vtkusers] java memory

Jonathan Morra jonmorra at gmail.com
Mon Mar 28 20:19:22 EDT 2011


Should I have to call System.gc(); and System.runFinalization(); frequently
with VTK+Java?

On Mon, Mar 28, 2011 at 5:05 PM, Jonathan Morra <jonmorra at gmail.com> wrote:

> OK, can you explain what you mean by Java reference count?  Here's some
> example code that doesn't seem to be working well.  Every time I run it I
> seem to accumulate memory I don't want.  Also, I'm using
> vtkJavaGarbageCollector
>
>         vtkLinearExtrusionFilter extruder = new vtkLinearExtrusionFilter();
>         extruder.SetInput(data);
>         extruder.Update();
>         vtkPolyData extruderOutput = extruder.GetOutput();
>
>         vtkPolyDataToImageStencil pol2Stenc = new
> vtkPolyDataToImageStencil();
>         pol2Stenc.SetTolerance(0);
>         pol2Stenc.SetInput(extruderOutput);
>         pol2Stenc.SetInformationInput(binaryOrgan);
>         pol2Stenc.Update();
>         vtkImageStencilData pol2StencOutput = pol2Stenc.GetOutput();
>
>         vtkImageStencil stencil = new vtkImageStencil();
>         stencil.SetInput(binaryOrgan);
>         stencil.ReverseStencilOn();
>         stencil.SetStencil(pol2StencOutput);
>         stencil.Update();
>         final vtkImageData stencilOutput = stencil.GetOutput();
>
>             return stencilOutput;
>
> On Mon, Mar 28, 2011 at 4:58 PM, Sebastien Jourdain <
> sebastien.jourdain at kitware.com> wrote:
>
>> Hi Jonathan,
>>
>> You should start by reading that thread.
>>
>> http://markmail.org/thread/k3u7gvsqwkocwfo5
>>
>> Seb
>>
>> On Mon, Mar 28, 2011 at 7:44 PM, Jonathan Morra <jonmorra at gmail.com>
>> wrote:
>> > I've been working with Java for a while now and can't seem to get my
>> memory
>> > usage under control.  Is there anyone out there who's an expert in
>> VTK+Java
>> > or at the very least has dealt with extensive memory usage in Java with
>> VTK
>> > that could give me some advice or some reading material.
>> > Thanks
>> > _______________________________________________
>> > Powered by www.kitware.com
>> >
>> > Visit other Kitware open-source projects at
>> > http://www.kitware.com/opensource/opensource.html
>> >
>> > Please keep messages on-topic and check the VTK FAQ at:
>> > http://www.vtk.org/Wiki/VTK_FAQ
>> >
>> > Follow this link to subscribe/unsubscribe:
>> > http://www.vtk.org/mailman/listinfo/vtkusers
>> >
>> >
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110328/3f86df81/attachment.htm>


More information about the vtkusers mailing list