Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Weak hash table
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Weak hash table
>From: Christophe Raffalli <raffalli@univ-savoie.fr>
>
>The semantics of weak pointer are just some kind of cache where value
>can be erased at any time by the GC.

This is what the documentation specifies.


>The kind of weak array you need is array where value are erased by the
>GC if and only if the value is not pointed from outside the weak array.
>That is the mark phase of the GC does not traverse weak array.

This is what the implementation does (if you replace "if and only if"
with "at some time when" in the above).

The weak arrays are grossly underspecified because I don't know how to
clearly explain what they do to someone who doesn't already know what
a weak pointer is.  If someone wants to do write that explanation,
I'll be very happy.

-- Damien
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners