Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] fumbling with Gc.finalise
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-10-01 (21:08)
From: Chris Quinn <cq@h...>
Subject: [Caml-list] fumbling with Gc.finalise
Hi TeamCaml,

I've been using this function quite a bit now I've discovered it.
I thought I'd captured the dependencies between a bunch of related resource handles such as to guarantee orderly resource release. But I've just been bitten and realised that if a bunch of values are no longer reachable from the rest of the program, 
no account is taken of the pointer relationships existing between them. Thus there is no guaranteed running order of the finalisation functions.

Would it not be more reasonable to treat the argument and finalisation closure as roots until the latter has actually completed execution?

Chris Q.
Bug reports:  FAQ:
To unsubscribe, mail  Archives: