Module Core_kernel.Weak

Module for dealing with weak pointers, i.e., pointers that don't prevent garbage collection of what they point to.

This module is like the OCaml standard library module of the same name, except that it requires that the values in the weak set are heap blocks.

type 'a t
include sig ... end
val sexp_of_t : ('a ‑> Base.Sexp.t) ‑> 'a t ‑> Base.Sexp.t
val create : len:Core_kernel__.Import.int ‑> _ t
val length : _ t ‑> Core_kernel__.Import.int
val set : 'a t ‑> Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.Heap_block.t Core_kernel__.Import.option ‑> Core_kernel__.Import.unit
val get : 'a t ‑> Core_kernel__.Import.int ‑> 'a Core_kernel__.Import.Heap_block.t Core_kernel__.Import.option
val is_some : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.bool
val is_none : _ t ‑> Core_kernel__.Import.int ‑> Core_kernel__.Import.bool