Class Weak_memo.c


class [< .. >] c : int -> object  end
The memo class.

new Weak_memo.c size create a new memo object with an original size of size.


method add : < .. > -> unit
Add an object to the memo. This won't prevent this object to be recolect by the Gc.

Do nothing if the object is already there.

method clear : unit -> unit
Empty the memo object.
method count : int
Return the number of object in the memo.
method find : 'a. (< .. > as 'a) -> (< .. > as 'b)
Find an object that is physicaly equal to the object given as argument.

Raise Not_found if there is none.

method mem : 'c. (< .. > as 'c) -> bool
Return true if there is an object in the memo that is equal to the object given as argument. Return false otherwise.
method remove : 'd. (< .. > as 'd) -> unit
Remove an object that is physicaly equal to the object given as argument if there is one.

Do nothing otherwise.