From 1bf268bea7e6ac8cb475495c9a2f27a8b8a2db8a Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 2 Jan 2012 23:17:28 +0000 Subject: [PATCH] - adapt name for destroyByteBuffer() git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8977 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- engine/src/core/com/jme3/util/BufferUtils.java | 2 +- engine/src/test/jme3test/app/TestReleaseDirectMemory.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/engine/src/core/com/jme3/util/BufferUtils.java b/engine/src/core/com/jme3/util/BufferUtils.java index 324871b9e..234d0fdd7 100644 --- a/engine/src/core/com/jme3/util/BufferUtils.java +++ b/engine/src/core/com/jme3/util/BufferUtils.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); diff --git a/engine/src/test/jme3test/app/TestReleaseDirectMemory.java b/engine/src/test/jme3test/app/TestReleaseDirectMemory.java index 043997221..0c8c9f1ca 100644 --- a/engine/src/test/jme3test/app/TestReleaseDirectMemory.java +++ b/engine/src/test/jme3test/app/TestReleaseDirectMemory.java @@ -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); } }