Ignore:
Timestamp:
Jun 5, 2023, 6:44:57 PM (18 months ago)
Author:
chronos
Message:
  • Modified: Remove U prefix from unit names.
  • Modified: Updated Common package.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Pool.pas

    r144 r145  
    1 unit UPool;
     1unit Pool;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, syncobjs, fgl, UThreading;
     6  Classes, SysUtils, syncobjs, Generics.Collections, Threading;
    77
    88type
     
    2020    function NewItemObject: TObject; virtual;
    2121  public
    22     Items: TFPGObjectList<TObject>;
    23     FreeItems: TFPGObjectList<TObject>;
     22    Items: TObjectList<TObject>;
     23    FreeItems: TObjectList<TObject>;
    2424    function Acquire: TObject; virtual;
    2525    procedure Release(Item: TObject); virtual;
     
    106106constructor TThreadedPool.Create;
    107107begin
    108   inherited Create;
     108  inherited;
    109109  Lock := TCriticalSection.Create;
    110110end;
     
    114114  TotalCount := 0;
    115115  Lock.Free;
    116   inherited Destroy;
     116  inherited;
    117117end;
    118118
     
    183183begin
    184184  inherited;
    185   Items := TFPGObjectList<TObject>.Create;
    186   FreeItems := TFPGObjectList<TObject>.Create;
    187   FreeItems.FreeObjects := False;
     185  Items := TObjectList<TObject>.Create;
     186  FreeItems := TObjectList<TObject>.Create;
     187  FreeItems.OwnsObjects := False;
    188188  FReleaseEvent := TEvent.Create(nil, False, False, '');
    189189end;
     
    199199
    200200end.
    201 
Note: See TracChangeset for help on using the changeset viewer.