Ugh, I’ve found some postings that say you CAN get the low memory
warning in a foreground app, but it’s more than likely you that’s
causing it, and what would be the solution?
As I was saying in the earlier message, iOS does some stuff during low
memory you might not want to deal with, like unloading any nibs and view
controllers and such.
It’s still not reasonable to handle in an event; for one, if you need
more than 5 seconds to save state, that can only be handled in the
callback itself (again, as far as I can read in the docs.)
Also, and here’s the killer, without callbacks you can’t respond to low
memory or kill properly (you have no CPU time, you can’t call pump events.)
iOS, by design, expects you to do this stuff in a callback. Can you get
away with an event? Probably, but it’ll be in the realm of a hack and
you are asking for future problems in new iOS versions and possible
Forest Hale wrote:> I think you’re on to something here - we should figure out exactly what circumstances can cause a callback, and it may be perfectly reasonable to handle it as an event if we can conclusively show that
only PumpEvents produces the callbacks.
However as a hypothetical - can we get a low memory callback when issuing malloc?