I have been trying to bring down the memory usage of my app, and after profiling it turns out that NSRegularExpression is quite a memory hog.
One of my fistMatchInString calls (the first one?) allocates 1 MB of memory which is never released. And each call to firstMatchInString leaks a "NSConcreteValue" (whatever that is).
Have you experienced the same behavior, and do you know how to get around it? Do you know of good alternatives to NSRegularExpression?
Before you ask: all my regular expression patterns are small and created statically. All strings to match are small as well.