On 06/19/2017 08:02 AM, François Bobot
wrote:
Hi,
Le 19/06/2017 à 01:45, Evgeny Roubinchtein a écrit :
I have one more
question about Gc.finalise to which I couldn't find an answer in
the documentation.
Suppose I do, "Gc.finalise f v", and the function f makes the
value v reachable again. If I want f
to be called again should v become unreachable again, do I need
to again call "Gc.finalise f v",
after f has "revived" v?
I think so, but I didn't double checked with the code.
Indeed it is. This is even used to implement alarm in stdlib :
https://github.com/ocaml/ocaml/blob/trunk/stdlib/gc.ml#L103
--
JH