[Pharo-project] Be careful, problem with WeakOrderedCollection in Pharo (there is a fix)
asqueaker at gmail.com
Mon Aug 8 14:51:11 EDT 2011
Ok, thanks for the note.
I just skimmed through the issue in tracker and it sounds like Marcus
has it straightened out.. I'm glad Pharo decided to keep
WeakOrderedCollection and refer to #arrayType in OrderedCollection
rather than hard-coded Array.
On Mon, Aug 8, 2011 at 6:21 AM, Mariano Martinez Peck
<marianopeck at gmail.com> wrote:
> 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
> 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:
> and then you should fix the already created instances.
> ps: I have no idea how much Magma uses WeakOrderedCollection, but I thought
> it was just worth it to raise a warning.
> Magma mailing list
> Magma at lists.squeakfoundation.org
More information about the Pharo-dev