[DGD] Self destructing keys

Shentino shentino at gmail.com
Tue Aug 15 01:33:29 CEST 2006


I remembered how mappings automatically clean out when an object key
or value gets destructed...

So I thought I'd try using "objects" as self-destructing keys for
caching and stuff.

I'd have some information X that caches Y.

Now, I could arrange Y to destruct the "cache key" that X was using,
and any stale data in X would automatically vanish.

Anyone see any problems?

My main concern is that while it works in theory, I might be
cluttering up the driver's internal memory by leaving lots of orphaned
data to garbage collect.



More information about the DGD mailing list