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