type 'a t;;
The type of a set of weak pointers.
val create: int -> 'a t;;
Weak.set_create len creates a set of weak pointers which an
initial size of
len weak pointers. The set can contains more
len weak pointers at a time, but then the set will be
val add: 'a t -> 'a -> 'a t;;
Weak.set_add set obj adds a weak pointer to
obj to a set
set of weak pointers and returns the new set. Indeed, if the
set is full, a new set is allocated.
val to_array: 'a t -> 'a array;;
Weak.set_array set returns an array containing all life objects
in the set
val remove: 'a t -> 'a -> bool;;
Weak.set_remove set obj removes
obj from the set
operation can be expensive, since all the set must be scanned.
val info: 'a t -> int * int;;
Weak.set_info set returns a couple (
size is the total size of
nobjs the number of
life objects in
Go to the first, previous, next, last section, table of contents.