in reply to RegEx on 4MB file consumes of 2GB of ram before windows shuts it down (Memory Leak in 5.8.2)

The fact that you're slurping 'stranger.xap' into memory isn't helping your memory consumption.

It may be much more efficient (from a memory standpoint) to extract the values that you need from 'temp.txt' and then scan 'stranger.xap' by lines or paragraphs (faq) to find matches.

Hanlon's Razor - "Never attribute to malice that which can be adequately explained by stupidity"
  • Comment on Re: RegEx on 4MB file consumes of 2GB of ram before windows shuts it down.