Browse thread
Hweak question
- Alessandro Baretta
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2006-09-04 (14:14) |
From: | Alessandro Baretta <a.baretta@s...> |
Subject: | Hweak question |
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