@Override
    public void destroyDirectBuffer(Buffer toBeDestroyed) {
        // If it is a wrapped buffer, get it's inner direct buffer field and destroy it
        Field field = fieldIndex.get(toBeDestroyed.getClass());
        if (field != null) {
            try {
                ByteBuffer innerBuffer = (ByteBuffer) field.get(toBeDestroyed);
                if (innerBuffer != null) {
                    // Destroy it using the reflection method
                    reflectionAllocator.destroyDirectBuffer(innerBuffer);
                }
            } catch (IllegalAccessException ex) {
            }

        } else {
            // It is not a wrapped buffer, use default reflection allocator to remove it instead.
            reflectionAllocator.destroyDirectBuffer(toBeDestroyed);
        }
    }
Searches the inner direct buffer of the Android-specific wrapped buffer classes
and destroys it using the reflection allocator method.

@param toBeDestroyed The direct buffer that will be "cleaned".
jme3-android/src/main/java/com/jme3/util/AndroidBufferAllocator.java