2

I several views in an iPhone app which happen to use independent openGL contexts. They are not necessarily long-lived so they go away before the process does. And they have a couple textures in each.

Does -releaseing the EAGLContext cause all that GL state to get cleaned up for me? Or am I leaking textures etc by not finding a place to call glDeleteTextures from?

Thanks.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Ben Zotto
  • 70,108
  • 23
  • 141
  • 204

1 Answers1

1

All resources associated with a sharegroup are destroyed, when the last reference to that sharegroup is released (usually by destroying all of the shared contexts).

Do be careful: when you make a context current for a thread, that counts as a reference. A context will not be deleted until it is detached from all threads that it may have been bound to.

Frogblast
  • 1,671
  • 10
  • 9