[Vm-dev] Re: [Pharo-dev] FogBugz (Case [Issue]10840) Collection - WeakSet>>#size utterly broken

Igor Stasenko siguctua at gmail.com
Sat Jun 8 06:44:16 UTC 2013


Here is a simple solution for you:

set asArray size.

But come on, why asking for weak container size???
What you gonna do with this information? Iterate over it?

And besides, there is #slowSize. A size is left as it is. Because it is fast.
There is no way to get accurate size of weak container either way,
because at the very next
message, GC can be triggered and some items turn garbage => size is invalid.
So, it doesn't matters if you calculate size slow or fast, it will be
always inaccurate.

And issue is invalid.

-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list