eihis
Posts: 2
Joined: Sat Feb 16, 2013 7:01 am

opengl resources release problem

Mon Oct 12, 2015 7:29 am

hi there,

i'm working on a gles based application, and all malloc'd spaces are cleanup at the program end ( i mean, space from the arm side )
the opengl part of the program ends with the sequence :
glflush ;
glfinish;
a last " eglSwapBuffers(display, surface);"
then
eglMakeCurrent( display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT );
eglDestroyContext(display,context);
eglDestroySurface(display,surface);
eglTerminate(display);

all with no errors,
but when i check the gpu side allocations ( vcdbg reloc ) , i can see that a block of data remains and is not cleared.
each time my program is run and ends, one more of this blocks appear.
looks like a 'memory leak' ..
the bloc appears as a block of 149504 , with a name : 'GLSL_COPY_CONTEXT_T.mh_blob'

so the question is : is my program closed safely with successive commands i listed ?
- do i have to manage some cleanup of the GL resources in the GPU side before closing everything ?
- or is a normal thing to have that blobs remaining on the gpu side ( maybe it will be free'd and reallocated later if more space is needed ? )

thanks for your answers

dattrax
Posts: 52
Joined: Sat Dec 24, 2011 5:09 pm

Re: opengl resources release problem

Wed Dec 16, 2015 7:17 pm

You could try

eglReleaseThread()

Before you terminate. This should clear any bound but not deleted resources.

eihis
Posts: 2
Joined: Sat Feb 16, 2013 7:01 am

Re: opengl resources release problem

Wed Feb 17, 2016 8:25 am

ok , i'm late but thanks for the suggestion. i'll try it once i'm back to the GL world.
I'm playing with the motion vectors from the Rpi camera now.
Have successfully used mmal ports , setting an encoder and feed the output vectors datas into an opencv app.
(okay, nothing here about opengl, but thats the point :) )


thanks for your answer.

Return to “OpenGLES”