Update auto-updated Java files
[ldk-java] / src / main / java / org / ldk / structs / Option_CVec_NetAddressZZ.java
index 9ae23246e3627ce0706f5a1367c46db59dd35809..15a5fe325ab876f4164a09202828e866147cf4b9 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;
 
 
@@ -29,6 +30,9 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                assert false; return null; // Unreachable without extending the (internal) bindings interface
        }
 
+       /**
+        * When we're in this state, this COption_CVec_NetAddressZZ contains a crate::c_types::derived::CVec_NetAddressZ
+        */
        public final static class Some extends Option_CVec_NetAddressZZ {
                public final NetAddress[] some;
                private Some(long ptr, bindings.LDKCOption_CVec_NetAddressZZ.Some obj) {
@@ -44,6 +48,9 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                        this.some = some_conv_12_arr;
                }
        }
+       /**
+        * When we're in this state, this COption_CVec_NetAddressZZ contains nothing
+        */
        public final static class None extends Option_CVec_NetAddressZZ {
                private None(long ptr, bindings.LDKCOption_CVec_NetAddressZZ.None obj) {
                        super(null, ptr);
@@ -54,6 +61,7 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
         */
        public static Option_CVec_NetAddressZZ some(NetAddress[] o) {
                long ret = bindings.COption_CVec_NetAddressZZ_some(o != null ? Arrays.stream(o).mapToLong(o_conv_12 -> o_conv_12.ptr).toArray() : null);
+               Reference.reachabilityFence(o);
                if (ret >= 0 && ret <= 4096) { return null; }
                Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(ret_hu_conv);
@@ -71,12 +79,19 @@ public class Option_CVec_NetAddressZZ extends CommonBase {
                return ret_hu_conv;
        }
 
+       long clone_ptr() {
+               long ret = bindings.COption_CVec_NetAddressZZ_clone_ptr(this.ptr);
+               Reference.reachabilityFence(this);
+               return ret;
+       }
+
        /**
         * Creates a new COption_CVec_NetAddressZZ which has the same data as `orig`
         * but with all dynamically-allocated buffers duplicated in new buffers.
         */
        public Option_CVec_NetAddressZZ clone() {
                long ret = bindings.COption_CVec_NetAddressZZ_clone(this.ptr);
+               Reference.reachabilityFence(this);
                if (ret >= 0 && ret <= 4096) { return null; }
                Option_CVec_NetAddressZZ ret_hu_conv = Option_CVec_NetAddressZZ.constr_from_ptr(ret);
                ret_hu_conv.ptrs_to.add(this);