<font color='black' size='2' face='arial'><font color="black" face="arial" size="2">

<div> Hi <font><font color="black" face="arial" size="2">Sebastien,<br>
&nbsp;&nbsp;&nbsp;&nbsp; <br>
Thanks for your quick response. I tried </font></font><font><font color="black" face="arial" size="2">vtkGlobalJavaHash.GC(). But the cache memory is not released. So only i moved to deleteAll().</font></font><br>
<br>
My code is <br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkGlobalJavaHash.GarbageCollector.SetAutoGarbageCollection(true);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkGlobalJavaHash.GarbageCollector.SetDebug(true);<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkGlobalJavaHash.GC();<br>
<br>
I got the following line repeatedly as output.<br>
<br>
<font><font color="black" face="arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkJavaGarbageCollector deleted 0 references.</font></font><br>
&nbsp;<font><font color="black" face="arial" size="2"><font><font color="black" face="arial" size="2">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkJavaGarbageCollector deleted 0 references.</font></font></font></font><br>
<br>
Please help me on this.<br>
</div>



<div> <br>

</div>



<div style="clear: both;"><a href="javascript:void(0)" style="font: lighter 10px Verdana,Arial; color: rgb(0, 0, 0);"><img src="http://presence.mail.aol.com/mailsig/?sn=kingvsk" align="absmiddle" border="0"></a>&nbsp;With Regards,<br>

            <br>

        Sathish Kumar V</div>



<div> <br>

</div>



<div> <br>

</div>



<div style="font-family: arial,helvetica; font-size: 10pt; color: black;">-----Original Message-----<br>

From: Sebastien Jourdain &lt;sebastien.jourdain@kitware.com&gt;<br>

To: Sathish kumar &lt;kingvsk@aol.com&gt;<br>

Cc: vtkusers &lt;vtkusers@vtk.org&gt;<br>

Sent: Mon, Apr 25, 2011 6:05 pm<br>

Subject: Re: [vtkusers] JVM Crashes while Call vtkGlobalJavaHash.DeleteAll() in Ubuntu...<br>

<br>








<div id="AOLMsgPart_1_8371850c-936e-40aa-a47f-ecf2b05ba40d">

Hi Sathish,9
<div><br>

</div>



<div>Did you try to call vtkGlobalJavaHash.GC() instead ? If you want to call DeleteAll(), you really have to make sure that no VTK object is used inside Java anymore. What I mean is, if for some reasons some methods get called on the vtkPanel after calling deleteAll(), you are definitely in trouble.&nbsp;</div>




<div><br>

</div>



<div>Seb</div>



<div><br>



<div class="gmail_quote">On Mon, Apr 25, 2011 at 2:44 AM, Sathish kumar <span dir="ltr">&lt;<a __removedlink__612653726__href="mailto:kingvsk@aol.com">kingvsk@aol.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<font color="black" face="arial" size="2"><font color="black" face="arial" size="2">



<div> Hi all,<br>


<br>


&nbsp;&nbsp;&nbsp; I am using VTK with Java wrapper for constructing Dicom 3D. It works fine. But while closing the 3D window the cache memory is not released. After I found that, vtkGlobalJavaHash.DeleteAll() method should be called to destroy all vtk native objects. So i called that method within formclosed event. This works fine with windows and Mac. But with Linux it leads to jvm crash. I don't know where the problem is. Please help me on this.<br>



<br>


System Configrations:<br>


&nbsp;&nbsp;&nbsp; LinuxMint - Release 10 (Julia)<br>


&nbsp;&nbsp;&nbsp; Memory&nbsp;&nbsp; - 2.0 GB<br>


&nbsp;&nbsp;&nbsp; Processor- Intel Core 2 Duo<br>


&nbsp;&nbsp;&nbsp; JVM&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; - Java(TM) SE Runtime Environment (build 1.6.0_22-b04)<br>


<br>


I added the code snippet...<br>


<br>


loadDicomdata{<br>


&nbsp;&nbsp;&nbsp; // Code for Load the Dicom Images using vtkDicomImagereader...<br>


}<br>


<br>


Load3DMIP(){<br>


<br>


&nbsp;&nbsp;&nbsp; // Code for construct and Display the 3D in JFrame...<br>


}<br>


<br>


private void formWindowClosed(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosed<br>


<b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkGlobalJavaHash.DeleteAll();</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Here the Problem<br>


}<br>


<font face="Arial, Helvetica, sans-serif"><br>


</font>
</div>







<div style="clear: both;"><a style="font: lighter 10px Verdana,Arial; color: rgb(0, 0, 0);"><img align="absmiddle" border="0"></a>&nbsp;With Regards,<br>

<font color="#888888">

            <br>



        Sathish Kumar V</font></div>



</font></font><br>

_______________________________________________<br>


Powered by <a target="_blank" __removedlink__612653726__href="http://www.kitware.com">www.kitware.com</a><br>


<br>


Visit other Kitware open-source projects at <a target="_blank" __removedlink__612653726__href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br>


<br>


Please keep messages on-topic and check the VTK FAQ at: <a target="_blank" __removedlink__612653726__href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>


<br>


Follow this link to subscribe/unsubscribe:<br>


<a target="_blank" __removedlink__612653726__href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>


<br>

</blockquote></div>

<br>

</div>



</div>

 <!-- end of AOLMsgPart_1_8371850c-936e-40aa-a47f-ecf2b05ba40d -->

</div>

</font></font>