diff options
author | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-12-31 10:02:53 +0000 |
---|---|---|
committer | michael <michael@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2007-12-31 10:02:53 +0000 |
commit | 115a6bed262246ff6de25acfc3d0d4182bdc8ceb (patch) | |
tree | 3e16ea29aa507034eac7f5ec8f541a007605ecdb /packages/fcl-json | |
parent | 2679bdf49b9c5eec72a9e73d5870f8bfefa3c842 (diff) | |
download | fpc-115a6bed262246ff6de25acfc3d0d4182bdc8ceb.tar.gz |
* Fixed memory leak. Patch by Inoussa OUEDRAOGO
git-svn-id: http://svn.freepascal.org/svn/fpc/trunk@9602 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'packages/fcl-json')
-rw-r--r-- | packages/fcl-json/src/jsonparser.pp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/fcl-json/src/jsonparser.pp b/packages/fcl-json/src/jsonparser.pp index dcf00df23c..9bff97bf33 100644 --- a/packages/fcl-json/src/jsonparser.pp +++ b/packages/fcl-json/src/jsonparser.pp @@ -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. |