I have a MonoTouch app out in the wild that dies sometimes with mprotect errno 12 (out of memory), and it always seems to get at least one ReceiveMemoryWarning notification beforehand.
I'm wondering what the right way to respond to this is. There are two types of things that my app could free: OpenGL textures and managed memory.
My questions about this are:
OpenGL textures: Will deleting OpenGL textures help?
Managed memory: I can't free this directly, but I can get null out references to it. Is that enough?
GC.Collect: Should I call GC.Collect() at the end of my handler? Does GC.Collect do anything immediately, or does it schedule a collection for the future?
Anything else I can/should do in response to this?