[ANN][VM] Ephemerons for Squeak
Chris Muller
afunkyobject at yahoo.com
Mon Aug 11 04:17:18 UTC 2003
Hi Andreas,
> While this problem can be always be solved in any given concrete
> situation by using one of the various weak association types, choosing
> the 'right' kind of association depends on a variety of factors some of
> which
> can change dynamically.
Can you help me understand what you meant by this? I've been using a simple
scheme for attaching properties to objects using Weak dictionaries.
My "registry" is constructed as:
((a WeakIdentityKeyDictionary)
keys: each object with additional properties
values:
((a Dictionary)
keys: propertyName
values: the property value)
Using this structure, once the object-with-additional-properties is garbage
collected, it's key is removed from the Weak dictionary, along with it's entire
Dictionary of properties.
I'll be excited if ephemerons can somehow improve on some limitation or bug
that I've overlooked. Alas, I don't see it at the moment, can you enlighten
me?
Regards,
Chris
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the Squeak-dev
mailing list
|