Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / Init.java
index c108fd98fccfa73262030f735f4979735d58e10a..fd91adc0b9a19823c8bdab978b6b469d8f2c744f 100644 (file)
@@ -4,6 +4,7 @@ import org.ldk.impl.bindings;
 import org.ldk.enums.*;
 import org.ldk.util.*;
 import java.util.Arrays;
+import java.lang.ref.Reference;
 import javax.annotation.Nullable;
 
 
@@ -24,6 +25,7 @@ public class Init extends CommonBase {
         */
        public InitFeatures get_features() {
                long ret = bindings.Init_get_features(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                InitFeatures ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new InitFeatures(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -35,6 +37,8 @@ public class Init extends CommonBase {
         */
        public void set_features(InitFeatures val) {
                bindings.Init_set_features(this.ptr, val == null ? 0 : val.ptr & ~1);
+               Reference.reachabilityFence(this);
+               Reference.reachabilityFence(val);
        }
 
        /**
@@ -42,6 +46,7 @@ public class Init extends CommonBase {
         */
        public static Init of(InitFeatures features_arg) {
                long ret = bindings.Init_new(features_arg == null ? 0 : features_arg.ptr & ~1);
+               Reference.reachabilityFence(features_arg);
                if (ret >= 0 && ret <= 4096) { return null; }
                Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Init(null, ret); }
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -50,6 +55,7 @@ public class Init extends CommonBase {
 
        long clone_ptr() {
                long ret = bindings.Init_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -58,6 +64,7 @@ public class Init extends CommonBase {
         */
        public Init clone() {
                long ret = bindings.Init_clone(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Init ret_hu_conv = null; if (ret < 0 || ret > 4096) { ret_hu_conv = new Init(null, ret); }
                ret_hu_conv.ptrs_to.add(this);
@@ -69,6 +76,7 @@ public class Init extends CommonBase {
         */
        public byte[] write() {
                byte[] ret = bindings.Init_write(this.ptr);
+               Reference.reachabilityFence(this);
                return ret;
        }
 
@@ -77,6 +85,7 @@ public class Init extends CommonBase {
         */
        public static Result_InitDecodeErrorZ read(byte[] ser) {
                long ret = bindings.Init_read(ser);
+               Reference.reachabilityFence(ser);
                if (ret >= 0 && ret <= 4096) { return null; }
                Result_InitDecodeErrorZ ret_hu_conv = Result_InitDecodeErrorZ.constr_from_ptr(ret);
                return ret_hu_conv;