03-31-2013 01:31 PM
I believe I have identified how they happen.
It appears that if there is a connectivity problem the memory buffers allocated by the process involved are not released even when the process is closed (the "X" is used.)
This would point to some sort of problem in the cleanup for the working set of a process that gets abandoned. It appears to be worse if the process is running in the Android sandbox, but as near as I can determine with my testing it is not limited to Android apps -- native ones also leak memory under these conditions.
When the system gets short enough on memory and cannot manage its way out of the box it also appears there's a watchdog somewhere in the code that forces a restart. This is arguably good rather than bad, as memory exhaustion that arises from this sort of problem can otherwise (and in fact almost-certainly would!) lead to a deadlock, which is really bad.
Blackberry needs to get on this; I'd love to look at more-detailed information on the memory allocation pattern and what has RAM out under synthetic conditions to try to reproduce this, but I cannot get a shell into the phone's OS or otherwise see enough data in real-time to know exactly where it's leaking -- but all signs point toward the network stack.