At 01:39 PM 5/26/00 +0100, Jan Vroonhof wrote:
However I lied before. It definitely is garbage collection related..
Here's what I think is happening. The instantiator changes due to someone
clicking on a tab, since the window hashtable is key weak once the old
instantiator is unreferenced the image instance is unreferenced also. Thus
it gets removed from the weak hashtable, however Ben's callback changes
mean that an instance can still be referenced from last-command-event so
the instance itself is not deleted and remains in the frame cache. Hence
the inconsistencies we are seeing.
If we make the hastable fully weak then we don't get any caching. If we
make the hashtable value weak we don't get any caching. It would be nice if
there was a hook in the hashtables that allowed you to do something when
something was removed. If we make the hashtable non-weak then we have no
way of removing instances except when the domain gets deleted - although
maybe this is an ok stratgey.
Maybe we need a new kind of weak hashtable - where the pair get removed
only if both the key and the value are unmarked.
andy
--------------------------------------------------------------
Dr Andy Piper
Principal Consultant, BEA Systems Ltd