[vtkusers] VTK/Java crashes -- WeakGlobalRef or garbage collection problem...solution?
Denis Barbier
bouzim at gmail.com
Fri Dec 18 16:24:07 EST 2009
On 2009/12/18 Nathan P Sharp wrote:
> 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.
My bad, I did not notice, that's fine by me.
> 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.
Are you sure your copy is up-to-date? Jeff fixed similar issues, see
revisions 1.63 and 1.62.2.1 at
http://public.kitware.com/cgi-bin/viewcvs.cgi/Wrapping/vtkWrapJava.c
Denis
More information about the vtkusers
mailing list