It depends on the garbage collected language, but I think in Java this
should do it:
http://java.sun.com/javase/6/docs/api/java/lang/ref/package-summary.html
in particular it looks like the WeakReference class would do what you want:
http://java.sun.com/javase/6/docs/api/java/lang/ref/package-summary.html
And also:
http://java.sun.com/javase/6/docs/api/java/util/WeakHashMap.html
I believe Python (and probably many other garbage collected languages as
well) support similar functionality.
Post a reply to this message
|