module Weak_hashtbl: sig
.. end
Weak_hashtbl
requires that all values in the table be boxed, which ensures that
weak pointers and finalization work as expected.
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
val ounit_tests : unit -> OUnit.test
Weak_hashtbl
requires that all values in the table be boxed, which ensures that
weak pointers and finalization work as expected.