- remove wheel finalization completely, need no deletion..

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8496 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
nor..67 2011-10-22 03:18:20 +00:00
parent 5080e3fe43
commit 4ba3abcda9
2 changed files with 0 additions and 21 deletions

View File

@ -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);
}

View File

@ -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<btRaycastVehicle*>(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