[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Weak Arrays
- To: self-interest@myself.stanford.edu
- Subject: Weak Arrays
- From: William R Burdick <burdick@ecn.purdue.edu>
- Date: Thu, 22 Oct 1992 22:01:30 -0500 (EST)
- Resent-date: Thu, 22 Oct 92 22:53:40 PDT
- Resent-from: Urs Hoelzle <urs@otis>
- Resent-message-id: <9210230553.AA00398@otis.Stanford.Edu>
- Resent-to: real-self-interest
On Oct 15, Ole Agesen replied to James Noble about using cannonical mirrors
that constructing a mirror table in Self would make un-collectable objects
in the table. (I'm using a primitive mailer, right now, so pardon the
mistakes, please) In ParcPlace's Smalltalk 4.0, they started using a gener-
ational garbage collector (like Self does) and they included a new type of
collection called a 'WeakArray,' which they use to solve exactly this type
of problem. A weak array can have objects it references garbage collected
right out from under it. Weak arrays are also periodically 'informed' when
their elements die, so that you can do some cleaning up if you want.
I'm sure this kind of thing isn't all that hard to implement (for all I know,
Self may already have something like this). This would be a usefull addition
to the wish-list, if it isn't there, though..
-- Bill