Be careful, problem with WeakOrderedCollection in Pharo (there is a fix)

Mariano Martinez Peck marianopeck at gmail.com
Mon Aug 8 11:21:23 UTC 2011


Hi Chris. We found a problem with WeakOrderedCollection in Pharo which may
cause problems in Magma users in Pharo. Basically, once a
WeakOrderedCollection needed to #grew, it stops being weak because the
internal array was replaced by a Array instead of a WeakArray.

(WeakOrderedCollection new instVarNamed: 'array') class ->>>> WeakArray


(WeakOrderedCollection new grow instVarNamed: 'array') class  ->>>> Array


So....I can imagine that some applications running magma may grow a lot due
to this bug.

Just to check whether someone is having this bug or not, you may want to
execute:

WeakOrderedCollection allInstances select: [:each | (each instVarNamed:
'array') class = Array ]

if you have instances, then that's a problem ;)

To fix it, you can fileine the changes of the issue tracker:
http://code.google.com/p/pharo/issues/detail?id=4596

and then you should fix the already created instances.

cheers

ps: I have no idea how much Magma uses WeakOrderedCollection, but I thought
it was just worth it to raise a warning.

-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/magma/attachments/20110808/e62f7ff5/attachment.htm


More information about the Magma mailing list