+ if ty_info.subty.rust_obj is not None and ty_info.subty.rust_obj == "LDKChannelMonitor":
+ # We take a Vec of references to ChannelMonitors as input to ChannelManagerReadArgs, if we clone them,
+ # we end up freeing the clones after creating the ChannelManagerReadArgs before calling the read
+ # function itself, resulting in a segfault. Thus, we manually check and ensure we don't clone for
+ # ChannelMonitors inside of vecs.
+ ty_info.subty.requires_clone = False