* Hweak question
@ 2006-09-04 14:14 Alessandro Baretta
0 siblings, 0 replies; only message in thread
From: Alessandro Baretta @ 2006-09-04 14:14 UTC (permalink / raw)
To: Remi Vanicat; +Cc: Ocaml
While googling for weak pointer resources, I have discovered the beautiful Hweak
library, implementing a real weak hashtable. I should have googled for it a long
time ago.
Just one question: how do you manage to maintain the bound value live when the
key is live? As far as I know from experimenting with the weak hashtables in the
vanilla distribution it is enough for the pointer to the bound value to become
unreachable for it be garbage collected away.
I tried implementating weak hastables on top of the weak "hashed set" functor of
the standard library but never managed to get the GC to keep my bindings live so
long as the the key was live.
Alex
--
*********************************************************************
Ing. Alessandro Baretta
Studio Baretta
http://studio.baretta.com/
Consulenza Tecnologica e Ingegneria Industriale
Technological Consulting and Industrial Engineering
Headquarters
tel. +39 02 370 111 55
fax. +39 02 370 111 54
Lab
tel. +39 02 9880 271
fax. +39 02 9828 0296
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-09-04 14:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-04 14:14 Hweak question Alessandro Baretta
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox