Closed benibela closed 8 years ago
FLRE tries to reuse the last captures array of the previous call for as memory manager speed optimization, so you do should use Captures := nil;
before the first MatchAll call.
FLRE is heavily optimized for reusing and caching of data (structures), because the best speed optimization is always to avoiding to do something unnecessary (=> to do nothing in these cases except reusing).
That seems like a good idea, but PtrMatchAll starts with SetLength(MultiCaptures,0);
...
I've fixed that some minutes ago :) That was still left over things from memory leak debugging sessions, which I've forgot to remove it again.
FPC always complains "Hint: Local variable "captures" does not seem to be initialized", can you use
out
parameters insteadvar
for the matchings?