Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / NodeInfo.java
index acfc3c4cfc5de955be637754487e4c96c0801ad2..4812f2f36160ba77c9e30d9a48b70e91b0564051 100644 (file)
@@ -7,7 +7,8 @@ public class NodeInfo extends CommonBase {
        NodeInfo(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
-               bindings.NodeInfo_free(ptr); super.finalize();
+               super.finalize();
+               bindings.NodeInfo_free(ptr);
        }
 
        // Skipped NodeInfo_set_channels