[fpc-pascal] possible json parser memory leak
ik
idokan at gmail.com
Sun Dec 18 18:39:44 CET 2011
On Sun, Dec 18, 2011 at 19:34, silvioprog <silvioprog at gmail.com> wrote:
> 2011/12/18 ik <idokan at gmail.com>:
> > Hello,
> >
> > I'm using FPC 2.6 (rc) x86_64 on Linux with JSONParser.
> >
> > I've written the following code:
>
> Use:
>
> var
> parser: TJSONParser;
> json_data: TJSONData;
> json_file: TFileStream;
> begin
> json_file := TFileStream.Create('test.json', fmOpenRead);
> parser := TJSONParser.Create(json_file);
> json_data := parser.Parse;
> WriteLn(json_data.AsJSON);
> json_data.Free;
> json_file.Free;
> parser.Free;
> end;
>
> Thx.
>
Thanks, that works.
>
> --
> Silvio Clécio
> ===============================================
> Blog - <silvioprog.com.br>
> Twitter - <twitter.com/silvioprog>
> Facebook - <facebook.com/silvioclecio>
> LazSolutions - <code.google.com/p/lazsolutions>
> Lazarus-BR - <groups.google.com.br/group/lazarus-br?hl=pt-BR>
> ===============================================
> * Conheça nosso canal IRC sobre Lazarus: #lazarus-br *
> ===============================================
> _______________________________________________
> fpc-pascal maillist - fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20111218/4e00a1ad/attachment.html>
More information about the fpc-pascal
mailing list