Gambas-it

Gambas dal mondo esterno => Mailing List => Topic aperto da: vuott - 08 Dicembre 2020, 12:47:42

Titolo: Come liberare un oggetto con un ServerSocket attivo ?
Inserito da: vuott - 08 Dicembre 2020, 12:47:42
https://lists.gambas-basic.org/pipermail/user/2020-December/070940.html
Titolo: Re:Come liberare un oggetto con un ServerSocket attivo ?
Inserito da: Gianluigi - 08 Dicembre 2020, 15:55:40
Citazione
So then, are you saying that I should implement a Close() method in the Tester class instead of relying on _free()?
Public Sub Close()
   MyServerSocket.Close
End

That doesn't make object sense to me because the internal workings of the Tester object should be privately encapsulated. (And,
there is no Open() method.) But, if that is what will work, then that's what I'll do.

Ma perché un metodo Close dovrebbe inficiare l'incapsulamento di una classe?
La stessa classe ServerSocket ne utilizza uno  :-\