Back: WeakKeyIdentityDictionary Up: Base classes Forward: WeakSet-accessing   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.216 WeakSet

Defined in namespace Smalltalk
Superclass: Set
Category: Collections-Weak

I am similar to a plain set, but my items are stored in a weak array; I track which of them are garbage collected and, as soon as I encounter one of them, I swiftly remove all.

1.216.1 WeakSet: accessing  (instance)
1.216.2 WeakSet: copying  (instance)
1.216.3 WeakSet: loading  (instance)


1.216.1 WeakSet: accessing

add: newObject
Add newObject to the set, if and only if the set doesn't already contain an occurrence of it. Don't fail if a duplicate is found. Answer newObject

do: aBlock
Enumerate all the non-nil members of the set


1.216.2 WeakSet: copying

deepCopy
Returns a deep copy of the receiver (the instance variables are copies of the receiver's instance variables)

shallowCopy
Returns a shallow copy of the receiver (the instance variables are not copied)


1.216.3 WeakSet: loading

postLoad
Called after loading an object; must restore it to the state before `preStore' was called. Make it weak again



Back: WeakSet-copying Up: WeakSet Forward: WeakValueIdentityDictionary   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on July, 23 2009 using texi2html