From 4ba3abcda9aa6c32f138029eea282259ded19629 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 22 Oct 2011 03:18:20 +0000 Subject: [PATCH] - remove wheel finalization completely, need no deletion.. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8496 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../bullet/com/jme3/bullet/objects/VehicleWheel.java | 10 ---------- .../native/com_jme3_bullet_objects_VehicleWheel.cpp | 11 ----------- 2 files changed, 21 deletions(-) diff --git a/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java b/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java index a1c11eac8..0eabbc3cd 100644 --- a/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java +++ b/engine/src/bullet/com/jme3/bullet/objects/VehicleWheel.java @@ -416,14 +416,4 @@ public class VehicleWheel implements Savable { this.applyLocal = applyLocal; } - @Override - protected void finalize() throws Throwable { - super.finalize(); - Logger.getLogger(this.getClass().getName()).log(Level.INFO, "Finalizing Wheel {0}", Long.toHexString(wheelId)); -// if (wheelId != 0 && wheelIndex != 0) { -// finalizeNative(wheelId, wheelIndex); -// } - } - - private native void finalizeNative(long wheelId, int wheelIndex); } diff --git a/engine/src/bullet/native/com_jme3_bullet_objects_VehicleWheel.cpp b/engine/src/bullet/native/com_jme3_bullet_objects_VehicleWheel.cpp index 367e31c0d..e95bd6aca 100644 --- a/engine/src/bullet/native/com_jme3_bullet_objects_VehicleWheel.cpp +++ b/engine/src/bullet/native/com_jme3_bullet_objects_VehicleWheel.cpp @@ -142,17 +142,6 @@ extern "C" { return vehicle->getWheelInfo(wheelIndex).m_skidInfo; } - JNIEXPORT void JNICALL Java_com_jme3_bullet_objects_VehicleWheel_finalizeNative - (JNIEnv *env, jobject object, jlong vehicleId, jint wheelIndex) { - btRaycastVehicle* vehicle = reinterpret_cast(vehicleId); - if (vehicle == NULL) { - jclass newExc = env->FindClass("java/lang/NullPointerException"); - env->ThrowNew(newExc, "The native object does not exist."); - return; - } - btWheelInfo m_wheelInfo[wheelIndex]; - delete(&m_wheelInfo); - } #ifdef __cplusplus } #endif