Skip to content

Memory leak's at big text data #88

Description

@Hadgehogs

Hello.
I parse a big data files and i catch a memory leak after TFLRE.Free() like this:

изображение

At Eureka mem leak log it's see like this:
изображение
изображение

I inspect, what count of execution of this block
изображение

is more, than count of execution of this block:

изображение

and i change free memory block to this code:

 for State in AllStates do begin
  if not Assigned(State) then
    Continue;
  SetLength(State^.SubMatches,0);
   Finalize(State^);
  FreeMem(State);
 end;
 FreeStates:=nil;

Memory leak is gone out. Does it's right decision?
Sorry for my bad English, it's not my native language.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions