[Glass] Simple questions while migrating code to GemStone (compatibility issues)

Martin McClure martin.mcclure at gemtalksystems.com
Wed Nov 13 15:06:18 PST 2013


On 11/13/2013 11:35 AM, Dale K. Henrichs wrote:
> 
>     - Do we have an alternative for WeakValueDictionary? 
> 
> In 3.x we have KeySoftValueDictionary which is the moral equivalent of
> WeakValueDictionary with the caveat that instances of 
> KeySoftValueDictionary cannot be persisted ... we only suppor vm level
> weakness ...

Note that soft references are only cleared under memory pressure, so it
may or may not meet your needs for equivalence to WeakValueDictionary.

We do support ephemerons in 3.x, which could be used to build
collections whose behavior is closer to traditional weak collections.
Ephemerons also are limited to being non-persistent.

Regards,

-Martin


More information about the Glass mailing list