Re: How do I tell an object to free up an owned object from thta object itself?

From: Maarten Wiltink (maarten_at_kittensandcats.net)
Date: 10/03/03


Date: Fri, 3 Oct 2003 12:55:37 +0200

Bo Berglund wrote in message ...
[...]
>B) But I cannot do the FSocket.Free in this destructor. It causes an
>access violation. So I left that for the TServerSocket to handle.

Probably because TServerSocket has lifetime control over these objects.
It did sound like you were adding your own reference maintenance to
the existing system kept by TServerSocket.

[...]
>If I stop listening (TServerSocket.Close) then all client sockets are
>disconnected. I can thus not have the server listen for a given time
>and allow connections, then stop listening but still let the already
>connected clients continue communicating. Strange, this makes it more
>difficult to set an upper limit on the number of clients allowed.

I think it should be possible to refuse to accept a new connection.

Groetjes,
Maarten Wiltink



Relevant Pages