Navindra Umanee
2/12/2005 4:04:00 PM
Hi,
I would like to have a lookup table with WeakRefs to various
structures so that they can be GC'ed if Ruby is low on space.
However, when I look up a structure, I want to get a strong ref from
the WeakRef so that I don't have to worry about it being collected
while being used.
I can seem to find any methods to get the strong ref from the WeakRef.
Maybe this can be done by having a second lookup table with WeakRefs
pointing to strong refs. I don't know if that will mess up the GC
though.
Any ideas?
Thanks,
Navin.