* BufferUtils.destroyDirectBuffer() now works on Android

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9408 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..rd 13 years ago
parent 29b2596359
commit 8b5f4cba36
  1. 11
      engine/src/core/com/jme3/util/BufferUtils.java

@ -1183,10 +1183,13 @@ public final class BufferUtils {
} }
// Apache Harmony // Apache Harmony
freeMethod = loadMethod("org.apache.harmony.nio.internal.DirectBuffer", "free"); ByteBuffer bb = BufferUtils.createByteBuffer(1);
Class<?> clazz = bb.getClass();
// GUN Classpath (not likely) try {
//finalizeMethod = loadMethod("java.nio.DirectByteBufferImpl", "finalize"); freeMethod = clazz.getMethod("free");
} catch (NoSuchMethodException ex) {
} catch (SecurityException ex) {
}
} }
} }

Loading…
Cancel
Save