glDrawElements allocating memory and not releasing it
- by Joshua Weinberg
Using OpenGLES 1.1 on the iPhone 3G (device, not simulator), I do normal drawing fun. But at points during the run of the application I get giant memory spikes, after a lot of digging with instruments I have found that it is glDrawElements that is grabbing the memory.
The buffer being allocated is 4 meg, which to me means its loading a texture into RAM, which I guess could be valid, but its never releasing this buffer, and is allocating multiple of them.
How do I make sure that these buffers that GL is creating get destroyed, instead of just hanging around?