Hi <span class="Apple-style-span" style="border-collapse: collapse; color: rgb(80, 0, 80); ">Sathish,</span><div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;"><br>
</span></font></div><div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;">I don't really understand what you are trying to do and what you are facing as issue. You have some memory leak when you quit your application or while the application is running ?</span></font></div>
<div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;">Moreover, what do you mean by "<span class="Apple-style-span" style="color: rgb(0, 0, 0); ">the cache memory is not released."</span></span></font></div>
<div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;"><font class="Apple-style-span" color="#000000"><br></font></span></font></div><div><font class="Apple-style-span" color="#500050"><span class="Apple-style-span" style="border-collapse: collapse;"><font class="Apple-style-span" color="#000000">Seb<br>
</font></span></font><br><div class="gmail_quote">On Tue, Apr 26, 2011 at 9:20 AM, Sathish kumar <span dir="ltr"><<a href="mailto:kingvsk@aol.com">kingvsk@aol.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<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>
<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>
vtkGlobalJavaHash.GarbageCollector.SetAutoGarbageCollection(true);<br>
vtkGlobalJavaHash.GarbageCollector.SetDebug(true);<br>
vtkGlobalJavaHash.GC();<br>
<br>
I got the following line repeatedly as output.<br>
<br>
<font><font color="black" face="arial" size="2"> vtkJavaGarbageCollector deleted 0 references.</font></font><br>
<font><font color="black" face="arial" size="2"><font><font color="black" face="arial" size="2"> vtkJavaGarbageCollector deleted 0 references.</font></font></font></font><div class="im"><br>
<br>
Please help me on this.<br>
</div></div><div class="im">
<div> <br>
</div>
<div style="clear:both"><a style="font:lighter 10px Verdana,Arial;color:rgb(0, 0, 0)"><img align="absmiddle" border="0"></a> With Regards,<br>
<br>
Sathish Kumar V</div>
<div> <br>
</div>
<div> <br>
</div>
</div><div style="font-family:arial,helvetica;font-size:10pt;color:black">-----Original Message-----<br>
From: Sebastien Jourdain <<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>><br>
To: Sathish kumar <<a href="mailto:kingvsk@aol.com" target="_blank">kingvsk@aol.com</a>><br>
Cc: vtkusers <<a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a>><br>
Sent: Mon, Apr 25, 2011 6:05 pm<br>
Subject: Re: [vtkusers] JVM Crashes while Call vtkGlobalJavaHash.DeleteAll() in Ubuntu...<br>
<br>
<div>
Hi Sathish,9
<div><div></div><div class="h5"><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. </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"><<a>kingvsk@aol.com</a>></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>
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>
LinuxMint - Release 10 (Julia)<br>
Memory - 2.0 GB<br>
Processor- Intel Core 2 Duo<br>
JVM - Java(TM) SE Runtime Environment (build 1.6.0_22-b04)<br>
<br>
I added the code snippet...<br>
<br>
loadDicomdata{<br>
// Code for Load the Dicom Images using vtkDicomImagereader...<br>
}<br>
<br>
Load3DMIP(){<br>
<br>
// 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> vtkGlobalJavaHash.DeleteAll();</b> // 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> With Regards,<br>
<font color="#888888">
<br>
Sathish Kumar V</font></div>
</font></font><br>
_______________________________________________<br>
Powered by <a>www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a>http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a>http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a>http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br>
</blockquote></div>
<br>
</div>
</div></div></div>
</div>
</font></font></blockquote></div><br></div>