DependentsArray size how does it work ?

nicolas cellier ncellier at ifrance.com
Wed Feb 8 22:05:50 UTC 2006


Le Mercredi 08 Février 2006 22:58, vous avez écrit :
> > One more question on dependents: how will DependentsArray have nil
>
> elements ?
> DependentArray is a weak subclass; you can see that in the class
> definition:
> Array weakSubclass: #DependentsArray
>      instanceVariableNames: ''
>      classVariableNames: ''
>      poolDictionaries: ''
>      category: 'Kernel-Objects'
>
> An element of a weak array is automatically replaced with nil when it
> becomes unreachable.This is one of the services of the garbage
> collector.
>
> Greetings
> Boris

Thanks Boris.

So the bug will eventually show up.

Unless one cautiously calls (model removeDependent: self).
But why bother when you know that you'll be automatically nilled...

Should i go to mantis with only a clue ?




More information about the Squeak-dev mailing list