- adapt name for destroyByteBuffer()

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8977 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
nor..67 13 years ago
parent de65246ddb
commit 1bf268bea7
  1. 2
      engine/src/core/com/jme3/util/BufferUtils.java
  2. 6
      engine/src/test/jme3test/app/TestReleaseDirectMemory.java

@ -1156,7 +1156,7 @@ public final class BufferUtils {
* The DirectByteBuffer that will be "cleaned". Utilizes reflection.
*
*/
public static void destroyDirectByteBuffer(ByteBuffer toBeDestroyed) {
public static void destroyByteBuffer(ByteBuffer toBeDestroyed) {
try {
Method cleanerMethod = toBeDestroyed.getClass().getMethod("cleaner");
cleanerMethod.setAccessible(true);

@ -32,17 +32,13 @@
package jme3test.app;
import jme3test.model.shape.*;
import com.jme3.app.SimpleApplication;
import com.jme3.material.Material;
import com.jme3.math.Vector3f;
import com.jme3.scene.Geometry;
import com.jme3.scene.shape.Box;
import com.jme3.util.BufferUtils;
import java.lang.reflect.InvocationTargetException;
import java.nio.ByteBuffer;
import java.util.logging.Level;
import java.util.logging.Logger;
public class TestReleaseDirectMemory extends SimpleApplication {
@ -64,7 +60,7 @@ public class TestReleaseDirectMemory extends SimpleApplication {
@Override
public void simpleUpdate(float tpf) {
ByteBuffer buf = BufferUtils.createByteBuffer(500000);
BufferUtils.destroyDirectByteBuffer(buf);
BufferUtils.destroyByteBuffer(buf);
}
}

Loading…
Cancel
Save