On Aug 3, 2011, at 12:51 38PM, Mariano Martinez Peck wrote:

> 
> 
> On Wed, Aug 3, 2011 at 12:42 PM, Nicolas Cellier 
> <[email protected]> wrote:
> I'm pretty sure the array inst var of your WeakOrderedColleciton is no
> more a WeakArray but a simple Array.
> 
> Yes, indeed, it is a normal Array and that cought my attention. But since I 
> have no idea about Weak stuff...I also noticed that WeakOrderedCollection is 
> declared as:
> 
> OrderedCollection subclass: #WeakOrderedCollection
>     instanceVariableNames: ''
>     classVariableNames: ''
>     poolDictionaries: ''
>     category: 'Collections-Weak'
> 
> instead of using the #weakSubclass: ... message:
> 
> OrderedCollection weakSubclass: #WeakOrderedCollection
>     instanceVariableNames: ''
>     classVariableNames: ''
>     poolDictionaries: ''
>     category: 'Collections-Weak'

Because the slots of the WeakOrderedCollection aren't weak. Those if its 
instance variable array is.
> 
>  
> This is because Pharo's WeakOrderedCollection is broken...
> 
> 
> Do you know a weak collection that is not broken in Pharo and let me do a 
> addLast: ?
>  
> Every reference to Array from within OrderedCollection should be
> replaced with message send (self arrayType).
> See for example, OrderedCollection>>#grow
> 
> 
> Thanks. I will check how many there are and try to fix them.

Only grow. (Well, asArray too, but that doesn't make sense to change)

Cheers,
Henry

Reply via email to