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 / VM.java
index c6a5220..1406898 100644 (file)
@@ -73,8 +73,13 @@ public class VM extends Host{
                }
                return null; 
        }
+       @Override
        protected void finalize() {
-               destroy();
+               try {
+                       nativeFinalize();
+               } catch (Throwable e) {
+                       e.printStackTrace();
+               }
        }
 
 
@@ -199,10 +204,7 @@ public class VM extends Host{
        public native void restore();
 
 
-       /**
-        * Destroy the VM
-        */
-       public native void destroy();
+       private native void nativeFinalize();