DependentsArray size how does it work ?

stéphane ducasse ducasse at iam.unibe.ch
Thu Feb 9 08:36:00 UTC 2006


sure

On 8 févr. 06, at 23:05, nicolas cellier wrote:

> 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