Hi All,

I encountered something that I do not understand. I tried this in 1.2.2 and 1.4 
with both my normal, older CogVM as well as the lastest one by Estaban.

In a normal clean image, there would be not Socket instances.

        Socket allInstances size = 0

Now create any kind of Socket

        Socket new (or newTCP, newUDP)

Now

        Socket allInstances size = 2

So Smalltalk reports two instances, but it seems they share the same 
socketHandle and semaphores, so one seems to be a shallow copy of the other. 

(Close the one instance, 3 timesRepeat: [ Smalltalk garbageCollect ] and they 
are both gone).

Is this normal ?
Is there really only one OS level socket ?
Does this have to do with Sockets being in a WeakRegistry ?

It is confusing to say the least.

Sven


Reply via email to