My iPhone application crashes due to low memory. I can see that a crashlog called lowmemory is saved after the crash. However, there are no leaks in the code.
Is there any other way to reduce the memory usage? I can see when profiling the app in simulator at one point the memory usage (allocations) reaches upto 91 mb and I suspect this is the point where the app is crashing on the device (iPhone 3GS). At that time I am doing a lot of string replacements (basically I am replacing around 100 tags in HTML).
First of all I don’t think that your app uses up to 91mb (is too huge). I think 91mb – is the size of memory that was allocated (and can be deallocated but this number wasn’t decreased).
Could you check the Live Bytes column?
About string replacements: I don’t know how you use such functionality. But I advice you to avoid to use NSString in this case and use NSMutableString and change string values inside – this allows you to avoid every time allocation of NSString objects.