Don't try this at home

Boris Gaertner Boris.Gaertner at gmx.net
Wed Mar 30 10:52:25 UTC 2005


"Ian Piumarta" <ian.piumarta at inria.fr> wrote:


> 
> wa := WeakArray new: 1.
> Smalltalk garbageCollect.
> obj := Object new.
> wb := WeakArray with: obj.
> wa replaceFrom: 1 to: 1 with: wb startingAt: 1.
> obj := nil.
> Smalltalk garbageCollectMost.
> Transcript show: wa
> 
> 
Very interesting. Have you noted that the crash
does not occur when you copy the definition of
SequenceableCollection>>replaceFrom:to:with:startingAt:
into the instance protocol of WeakArray.
This prevents the use of primitive 105.

(For Squeak 3.7 #5989)

Strange.

Boris



More information about the Squeak-dev mailing list