[Q] DependentsArray has weakreferences

Diego Gomez Deck DiegoGomezDeck at ConsultAr.com
Sat Mar 9 16:39:40 UTC 2002


Hello...

Testing rST, I made an IM (instant messenger)... the "nice" feature of ISU 
(I Squeak You) (ok... not good name, but no name is worst :) is that knows 
nothing about the network.... the objects use #addDependent: mechanism to 
send / receive messages, etc..

The bad news is: When I tried to use a view in one Squeak with a remote 
model, the model receive an remote-reference to the (from this point of 
view) remote view.... After days looking for an extraneous bug, I realize 
(with the help of aleReimondo) that DependentsArray holds weak-references 
to the objects.... this work so bad for rST, because the remote-reference 
object get collected by the gc, but the "real" view is still alive (in the 
other squeak)...

The question is: Why dependents are weak-references? In my point of view, 
this make no sense.... I want that views are alive meanwhile the model is 
alive.... if I don't want this, I can use #removeDependent:

I found that this functionality was changed in the changeset 
3701WeakObjectFields-ar dated 11 February 2001.

Depending on your answer/s I'll decide to make a workaround in rST or other 
thing....

Cheers,

Diego Gomez Deck




More information about the Squeak-dev mailing list