[vtkusers] VTK/Java crashes -- WeakGlobalRef or garbage collection problem...solution?
Nathan P Sharp
vtkusers at nps.parcellsharp.net
Fri Dec 18 16:12:15 EST 2009
Denis Barbier escribió:
>
> May vtkDefaultDispose be a singleton? That would avoid the creation
> of an instance for each vtkObjectBase.
> Could you also please post your changes in native code for VTKDelete?
> I will then re-send your changes as a patch against cvshead.
>
I didn't make it a formal singleton, but it is static so there won't be
one per object.
I hadn't written the native code yet! But I did today and it all seems
to be doing quite nicely against head from a couple of days ago.
Attached is the file. Thank you for turning it into a patch, trying to
dive through the generator code would probably take me a while if you
want the end results to be clean ;-)
As my next step, I'm digging around on my memory leaks using a
commercial memory checker. The first one I have enough info on to
report is that the generator code is not deleting the return value from
vtkJavaUTFToChar(). An example is vtkRenderWindowInteractorJava.cxx,
Java_vtk_vtkRenderWindowInteractor_SetEventInformationFlipY_192(), line
985.
Nathan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkObjectBaseJava.cxx
Type: text/x-c++src
Size: 3031 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091218/3e24d8a6/attachment.cxx>
More information about the vtkusers
mailing list