I have an iOS 3.2 program running on the iPad that is document-centric. Sometimes, when closing a document, there is a memory spike in Instruments. I'm pretty sure I'm not leaking memory, since the allocations graph stays pretty steady between 5mb and 10mb, except when closing, where it spikes up by about 5mb or so (and the leaks tool is showing very small leaks, a few k total, nothing that I'd expect to cause crashing).
This seems to be leading to iOS getting fed up and jettisoning my app. The memory use never goes about about 12mb, but the error log report displays that it's using 19988 "Count resident pages", which is way, way higher than anything else.
My problem is that I have no idea where the spikes are happening or why. It's the same code, over and over, and sometimes a document will spike, other times it won't. There doesn't seem to be a way to use both the debugger to step through the code and Instruments to see what's going on at the same time, so I'm not sure how to track down this problem.
Is there a way to see the memory use in the debugger?