MinieLibrary/src/main/java/com/jme3/bullet/NpoTracker.java
/**
     * Free the tracked native object by attempting to invoke
     * freeNativeObject(id) on its class and superclasses thereof.
     */
Free the tracked native object by attempting to invoke
freeNativeObject(id) on its class and superclasses thereof.
Free the tracked native object by attempting to invoke freeNativeObject ( id ) on its class and superclasses thereof .
void freeTrackedObject() {
        int invocationCount = 0;
        /*
         * Remove this tracker from the map BEFORE freeing the native object.
         */
        NativePhysicsObject.removeTracker(id);
        Class<?> c;
        for (c = referentClass; c != Object.class; c = c.getSuperclass()) {
            Method method;
            try {
                method = c.getDeclaredMethod("freeNativeObject", long.class);
            } catch (IllegalArgumentException
                    | NoClassDefFoundError exception) {
                System.out.println("c = " + c.getName());
                throw new RuntimeException(exception);
            } catch (NoSuchMethodException exception) {
                continue;
            }
            try {
                method.setAccessible(true);
                method.invoke(null, id);
                ++invocationCount;
            } catch (IllegalAccessException | IllegalArgumentException
                    | SecurityException | InvocationTargetException exception) {
                throw new RuntimeException(exception);
            }
        }
        assert invocationCount > 0 : invocationCount;
    }
void freeTrackedObject ( ) { int invocationCount = 0 ; /*
         * Remove this tracker from the map BEFORE freeing the native object.
         */ NativePhysicsObject . removeTracker ( id ) ; Class < ? > c ; for ( c = referentClass ; c != Object . class ; c = c . getSuperclass ( ) ) { Method method ; try { method = c . getDeclaredMethod ( "freeNativeObject" , long . class ) ; } catch ( IllegalArgumentException | NoClassDefFoundError exception ) { System . out . println ( "c = " + c . getName ( ) ) ; throw new RuntimeException ( exception ) ; } catch ( NoSuchMethodException exception ) { continue ; } try { method . setAccessible ( true ) ; method . invoke ( null , id ) ; ++ invocationCount ; } catch ( IllegalAccessException | IllegalArgumentException | SecurityException | InvocationTargetException exception ) { throw new RuntimeException ( exception ) ; } } assert invocationCount > 0 : invocationCount ; }
Free the tracked native object by attempting to invoke
 freeNativeObject(id) on its class and superclasses thereof.
Free the tracked native object by attempting to invoke freeNativeObject ( id ) on its class and superclasses thereof .