[osg-users] How to avoid Javas Garbage Collection to free large data array elements ?

Christian Kehl christian-kehl at web.de
Fri Jul 31 12:07:06 PDT 2015


A final remark on the question: I now implemented the memory-intensive method as a static native-JNI method in C++, having a static function call in Java left. First experiments with formerly crashing data indicate to really use C++ native methods for full-geometry modification processes (e.g. iterating over a Vec3Array VertexArray and modifying values). I will contact Rafa and Jan for integrating the wrapper+JNI source code in osgAndroid.

I am still a little bit speechless how the OpenCV guys are able managing large arrays and element-wise access without the Android SDK GC cutting their data off, but for now the JNI ways seems the only option.

Cheers,
Christian

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=64553#64553








More information about the osg-users mailing list