* BufferUtils.destroyDirectBuffer() now works on Android
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9408 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
29b2596359
commit
8b5f4cba36
@ -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…
x
Reference in New Issue
Block a user