module Weak_hashtbl: Weak_hashtbl
module Box:sig
..end
Weak_hashtbl
requires that all values in the table be boxed, which ensures that
weak pointers and finalization work as expected.
type ('a, 'b)
t
val create : 'a Core.Std.Hashtbl.Hashable.t -> ('a, 'b) t
val find : ('a, 'b) t -> 'a -> 'b option
val find_or_add : ('a, 'b) t ->
'a -> default:(unit -> 'b Box.t) -> 'b
val remove : ('a, 'b) t -> 'a -> unit
val replace : ('a, 'b) t -> key:'a -> data:'b Box.t -> unit