mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 11:29:24 +02:00
* Fixed memory leak. Patch by Inoussa OUEDRAOGO
git-svn-id: trunk@9602 -
This commit is contained in:
parent
323cd9e0fe
commit
621492c968
@ -41,6 +41,7 @@ Type
|
||||
function Parse: TJSONData;
|
||||
Constructor Create(Source : TStream); overload;
|
||||
Constructor Create(Source : TJSONStringType); overload;
|
||||
destructor Destroy();override;
|
||||
end;
|
||||
|
||||
EJSONScanner = Class(Exception);
|
||||
@ -245,5 +246,11 @@ begin
|
||||
FScanner:=TJSONScanner.Create(Source);
|
||||
end;
|
||||
|
||||
destructor TJSONParser.Destroy();
|
||||
begin
|
||||
FreeAndNil(FScanner);
|
||||
inherited Destroy();
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user