I am writing a 2D graphical program in Android OpenGL ES 2.0 and when I restarted my emulator it started giving the following error "OutOfResourceException initializing HW surface"
, and "... error 0x3003: EGL_BAD_MALLOC"
I am running a normal pre-cooked emulator for 4.0.3 with GPU emulation enabled, and the app runs fine and exits normally. However, the emulator seems to accrue memory on each compile and eventually just runs out. Windows Task Manager shows the emulator eating up about 850MB by then (my comp has 8GB). The only resources I'm loading from memory are two tiny shader programs that are just text, so I don't know where this buildup is coming from.
My question is why this is happening. Are there things OpenGL ES does in the background that I should be cognizant of in terms of managing memory? I've done Android apps before and this hasn't happened. I realize this is rather open-ended, so general wisdom on this would be highly appreciated.