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