OpenGL memory leak when tanslate between different UIWindows

Hello,
I am working on a product that uses CAEAGLLayer to draw images. I will move CAEAGLLayer from one UIWindow to another UIWindow. But at this time I found that my memory will keep growing. And this phenomenon will only appear after 13 systems.

Below is my code using CAEAGLLayer:

Code Block Objective-C
[self _deleteFramebuffer];
  glGenFramebuffers(1, &_framebuffer);
  glBindFramebuffer(GL_FRAMEBUFFER, _framebuffer);
  glGenRenderbuffers(1, &_renderbuffer);
  glBindRenderbuffer(GL_RENDERBUFFER, _renderbuffer);
  [_glContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:_eaglLayer];
  glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, _renderbuffer);
   
  glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &_backingWidth);
  glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &_backingHeight);


Does anyone knowns why?

Thank you,
Harold



What do you have inside _deleteFramebuffer?

Did you find any solution?

OpenGL memory leak when tanslate between different UIWindows
 
 
Q