cxflag203 / superobject

Automatically exported from code.google.com/p/superobject
0 stars 0 forks source link

Possible memory leak when trying to serialize an object #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
  TSubClass = class
  public
    aSubString: string;
  end;

  TSubClass = class
  public
    aSubClass: TSubClass;
  end;

var
  x: TMyClass;

  x:=TMyClass.Create;
  x.FromJson('{"aSubClass": {"aSubString": ""}}');
  x.Free;

FromJson creates a new object but does not free it before.
1xTSubClass is not freed everytime you call FromJson.
I tried to find how to free it in the FromClass procedure but not succeed.

Original issue reported on code.google.com by lpiot...@gmail.com on 13 Aug 2012 at 11:35