}
- /** Deletes this semaphore
- */
+ /** Deletes this semaphore when the GC reclaims it */
+ @Override
protected void finalize() {
- destroy();
+ try {
+ nativeFinalize();
+ } catch (Throwable e) {
+ e.printStackTrace();
+ }
}
- /** The native implementation for destroying a semaphore
- */
- private native void destroy();
+ private native void nativeFinalize();
/**
* Class initializer, to initialize various JNI stuff
*/
public static native void nativeInit();
static {
- Msg.nativeInit();
+ org.simgrid.NativeLib.nativeInit();
nativeInit();
}
}
\ No newline at end of file