tags:

views:

103

answers:

1

I am creating apps for the Ipad and its driving me crazy.

The memory that is usable by the apps changes depending on what other apps were ran before it. There is no reliable set amount of memory that can be used by your app.

i.e. If safari is ran then even after it closes it takes up some amount of memory which effects other apps.

Does anyone know if there is a way to clear the memory before my app runs so I can get the same running environment every time?

I have created several prototype apps to show to other people and it seems like after a few days they always come back to me and tell me that it crashes and to fix it.

When I test it, the reason is always because there is not enough memory (when there was enough before when I was testing). So I need to squeeze every bit of memory (which usually effects performance due to heavy loading and releasing) out of the app and tell them to restart their ipad if it continues to happen.

I read in a book that generally apps can use at max 40mb or so, most of the apps that crash are crashing at around 27mb. I want my remaining 13mb!!

A: 

While you will get a pretty good state after a reboot, what you really should look for is clean memory management and avoiding leaks.

Using the available memory wisely is solely up to the programmer. Don't tell your users to reboot the device, ever. And with every update of the OS memory things might change anyway.

Eiko
That's just the thing, my apps don't have leaks and although I manage my memory as best as I can, at the rate these apps are crashing, performance goes way down in order to manage memory as tight as it can be.I'm not asking my customers to reboot the device, they shouldn't have to. What I am asking is if there is a way to clear the unused memory before running my app without restarting the device.I generally only have things on the screen loaded into memory, if I could use the extra 13mb then I could improve performance and actually create the app that I want to.
funckymonk