Hello, I have the following code:
var
Cadena, NombrePropiedad: string;
J, I: integer;
PP: PPropList;
PPI: Pointer;
PT: PTypeData;
TipoPropiedad: TTypeKind;
b: boolean;
begin
Cadena := '';
PPI := aItem.ClassInfo;
PT := GetTypeData(PPI);
GetMem(PP, PT^.PropCount * SizeOf(PP));
J := GetPropList(aItem.ClassType, PP);
//for I := 0 to J - 1 do
//begin
// with PP^[I]^ do
// begin
// NombrePropiedad := Name;
// end;
// TipoPropiedad := PropType(aItem, NombrePropiedad);
// case TipoPropiedad of
// tkAString:
// begin
// Cadena := GetStrProp(aItem, NombrePropiedad);
// if Cadena <> '' then
// begin
// Cadena := Format('-%s "%s"', [NombrePropiedad, Cadena]);
// aLineas.Add(Cadena);
// end;
// end;
// tkBool:
// begin
// B := GetPropValue(aItem, NombrePropiedad);
// if b then
// begin
// Cadena := Format('-%s ', [NombrePropiedad]);
// aLineas.Add(Cadena);
// end;
// end;
// end;
//end;
Freememory(PP, PT^.PropCount * SizeOf(PP));
As you can see I comment many code, but I couln't find where is the leak memory.
Any idea
Thanks in advance
/BlueIcaro