I have an iPhone app that works great in a simulator. It responds well to warnings about memory, getting rid of everything that is not absolutely necessary. When I run it on the device, it works well. But after a certain amount of use, it crashes with error code 101, which, as far as I can tell, is the OS killing it due to memory usage. I see a memory warning (I register it), and my application responds to it, but dies shortly after.
If I look at the application in the Tools (on the device or in the SIM), it does not detect leaks. In addition, the use of network memory is 600-700 thousand bytes. Moving from different views of my application increases memory usage (as expected), but when releases and controllers are freed and freed, memory usage never becomes as low as it was. However, the addition is usually just something in the range of 1000-2000 bytes. Therefore, until the leaks show me the leaks, I suspect there is a problem. I also looked at all the objects that I select, and all of them seem to be fixed, as expected. The only objects that I see that continue to grow are GeneralBlock-N (where N is a number)
Should I not pay attention to the number of tools used? What will be the following steps when trying to diagnose a problem?
ADDED: I do not call malloc () or any CoreFoundation libraries that return a buffer for which I am responsible. The only non-Obj-C calls I make are logging NSLog statements.
memory-management iphone cocoa-touch
Bdebeez Nov 11 '08 at 18:29 2008-11-11 18:29
source share