Changeset 316 for trunk/UGameServer.pas


Ignore:
Timestamp:
Jun 19, 2024, 11:53:06 PM (5 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UGameServer.pas

    r287 r316  
    11unit UGameServer;
    22
    3 {$mode delphi}
    4 
    53interface
    64
    75uses
    8   Classes, SysUtils, UGame, DOM, XMLConf, fgl, UGameProtocol, UCommFrame, UPlayer;
     6  Classes, SysUtils, UGame, DOM, XMLConf, Generics.Collections, UGameProtocol,
     7  UCommFrame, UPlayer;
    98
    109type
     
    3231  { TServerClients }
    3332
    34   TServerClients = class(TFPGObjectList<TServerClient>)
     33  TServerClients = class(TObjectList<TServerClient>)
    3534    Game: TGame;
    3635    function SearchByPlayer(Player: TPlayer): TServerClient;
     
    7372  DefaultServerPort = 40009;
    7473
     74
    7575implementation
    7676
     
    120120destructor TServerClient.Destroy;
    121121begin
    122   Protocol.Free;
    123   CommFrame.Free;
    124   inherited Destroy;
     122  FreeAndNil(Protocol);
     123  FreeAndNil(CommFrame);
     124  inherited;
    125125end;
    126126
     
    278278begin
    279279  FreeAndNil(Clients);
    280   inherited Destroy;
     280  inherited;
    281281end;
    282282
Note: See TracChangeset for help on using the changeset viewer.