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