I have a question about using vtk inside Java.
Is it neccessary to call Delete() on something like a vtkImageData object, or is the memory safely released when it falls out of Scope or is set to null?
I have a question about using vtk inside Java.
Is it neccessary to call Delete() on something like a vtkImageData object, or is the memory safely released when it falls out of Scope or is set to null?
I would expect it is automatic and Delete() is only necessary if you call Register() yourself.
I haven’t looked at this code for a long time but I’m pretty sure it’s safe to call Delete() if you want to dispose of the underlying C++ object before the Java wrapper object goes out of scope. Otherwise let the garbage collector handle it.