I'm developing an app which runs on different EGL implementations, such as Mesa, ANGLE, AMD EGL, etc. The app creates multiple threads, each thread has a number of EGLContexts.
When a thread exits, should it deallocate all textures, buffers, etc. created in a context before destroying it (eglDestroyContext), or is it enough to simply destroy the context? Assume that the hardware may be iGPU and it's using system RAM as its memory.
You can destroy them if you want, but you don't have to:
EGL 1.5 spec, section 3.7.2 "Destroying Rendering Contexts", page 57 (emphasis mine):