Skip to content

Commit

Permalink
TBrookHTTPEntryPointList: ensures unpreparing on its destroying.
Browse files Browse the repository at this point in the history
  • Loading branch information
silvioprog committed Jun 14, 2019
1 parent cf37083 commit ce068c8
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Source/BrookHTTPEntryPoints.pas
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ TBrookHTTPEntryPointList = class(TBrookHandledOwnedCollection)
procedure CheckPrepared; inline;
public
constructor Create(AOwner: TPersistent); virtual;
destructor Destroy; override;
class function GetEntryPointClass: TBrookHTTPEntryPointClass; virtual;
procedure Assign(ASource: TPersistent); override;
function GetEnumerator: TBrookHTTPEntryPointListEnumerator;
Expand Down Expand Up @@ -295,6 +296,12 @@ constructor TBrookHTTPEntryPointList.Create(AOwner: TPersistent);
inherited Create(AOwner, GetEntryPointClass);
end;

destructor TBrookHTTPEntryPointList.Destroy;
begin
Unprepare;
inherited Destroy;
end;

class function TBrookHTTPEntryPointList.GetEntryPointClass: TBrookHTTPEntryPointClass;
begin
Result := TBrookHTTPEntryPoint;
Expand Down

0 comments on commit ce068c8

Please sign in to comment.