Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
more consistant identifier names around Java objects' finalization
[simgrid.git] / src / bindings / java / org / simgrid / msg / Mutex.java
index fbcb634..503588b 100644 (file)
@@ -16,10 +16,15 @@ public class Mutex {
        public Mutex() {
                init();
        }
+       @Override
        protected void finalize() {
-               exit();
+               try {
+                       nativeFinalize();
+               } catch (Throwable e) {
+                       e.printStackTrace();
+               }
        }
-       private native void exit();
+       private native void nativeFinalize();
        private native void init();
        public native void acquire();
        public native void release();