Autore Topic: Come liberare un oggetto con un ServerSocket attivo ?  (Letto 170 volte)

Offline vuott

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 11.316
  • Ne mors quidem nos iunget
    • Mostra profilo
« Chiunque, non ricorrendo lo stato di necessità, nel proprio progetto Gambas fa uso delle istruzioni Shell o Exec, è punito con la sanzione pecuniaria da euro 20,00 a euro 60,00. »

Offline Gianluigi

  • Moderatore globale
  • Senatore Gambero
  • *****
  • Post: 4.158
  • Tonno verde
    • Mostra profilo
Re:Come liberare un oggetto con un ServerSocket attivo ?
« Risposta #1 il: 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  :-\
nuoto in attesa del bacio di una principessa che mi trasformi in un gambero azzurro