<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hello,</div><div>the short example below creates a vtkConeSource and shows its GetVtkId() result. As far as I understand, the returned id should be the memory address of the native object.</div><div><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">When I run the program several times, most of the time the id returns a value in the range of 139e12 .. 141e12 which is very weird. Only sometimes a valid pointer is returned. Why??</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color:
 transparent; font-style: normal;">(I need the pointer of vtkObjects created in Java to pass them to native c++ functions.)</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Cheers</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Victor<br></div><div>&nbsp;</div><div>----------------------------------------</div><div>package cone5;<br><br>import vtk.vtkConeSource;<br><br>public class CopyOfCone5 {<br>&nbsp; static { <br>&nbsp;&nbsp;&nbsp; System.loadLibrary("vtkCommonJava"); <br>&nbsp;&nbsp;&nbsp; System.loadLibrary("vtkFilteringJava"); <br>&nbsp;&nbsp;&nbsp;
 System.loadLibrary("vtkIOJava"); <br>&nbsp;&nbsp;&nbsp; System.loadLibrary("vtkImagingJava"); <br>&nbsp;&nbsp;&nbsp; System.loadLibrary("vtkGraphicsJava"); <br>&nbsp;&nbsp;&nbsp; System.loadLibrary("vtkRenderingJava"); <br>&nbsp; }<br><br>&nbsp; public static void main (String []args) throws Exception {<br>&nbsp;&nbsp;&nbsp; vtkConeSource cone = new vtkConeSource();<br>&nbsp;&nbsp;&nbsp; System.err.println("id="+cone.GetVTKId());<br>&nbsp; }<br>}<br>----------------------------------------<br></div></div></body></html>