My app crash on ipod 3g and in crash reporter file the name of crash file is "low memory ..." does this crash because of low memory or this name is fake ? What should i do to solve it ?
2 Answers
This is not a fake name. First thing you should do is run the "leaks" performance tool on your app to see if you are leaking memory. This is most likely the problem, otherwise you are using too much memory and you need to find a way to do what you want with less memory.
Help with running the leaks program: Memory leak detection tools
-
-
If you click and hold on the run button you will get a drop down. Select "Profile". Instruments will open and prompt you to choose a test. You will probably want to use "Leaks" and possibly "Allocations". – drewag Apr 30 '11 at 19:03
This is definitely not a fake name, and to debug you should first use the Instruments
app provided with xcode and specifically look at the 'Allocations' and 'Leaks' instruments from the library.
Run these on your app and it will help you to identify how and where your code is leaking so much memory that it causes the OS to kill it.
There's several ways you can reduce memory usage in a basic app, here's a couple of generic ones:
- Remember to release / autorelease everything you
alloc
- Reuse table cells if applicable
- Try to cache things on disk, rather than in memory when loading from a resource
- Remove debug code / features

- 21,350
- 5
- 71
- 97