Reference counting

Bob Arning arning at charm.net
Tue Oct 26 16:50:23 UTC 1999


On Tue, 26 Oct 1999 11:11:57 -0400 agree at carltonfields.com wrote:
>I would appreciate an explanation of their utility.  I'm sure I'm simply being dull, but I don't understand why this would be necessary or helpful.

Think of it as a virtual-memory substitute: recently/frequently used objects would tend to stay in memory and would only get purged when space was running low. The current garbage collection purges objects as soon as they are no longer referenced, without regard to the cost of recreating them or the possibility that they will be needed soon.

You could do something along these lines by simply cacheing likely objects in a (non-weak) collection and modifying the lowSpaceWatcher to release some of these as needed.

Cheers,
Bob





More information about the Squeak-dev mailing list