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