Use AutoCloseable for structs named Locked*
[ldk-java] / src / main / java / org / ldk / structs / CommitmentUpdate.java
index a5de9e9d07b0cf0001ed8ac2e295d6642e9053ae..9f8c7a7a8521bf18e97122f6ff21136157b96401 100644 (file)
@@ -7,7 +7,8 @@ public class CommitmentUpdate extends CommonBase {
        CommitmentUpdate(Object _dummy, long ptr) { super(ptr); }
        @Override @SuppressWarnings("deprecation")
        protected void finalize() throws Throwable {
-               bindings.CommitmentUpdate_free(ptr); super.finalize();
+               super.finalize();
+               bindings.CommitmentUpdate_free(ptr);
        }
 
        public CommitmentUpdate(CommitmentUpdate orig) {