mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[all] fix numerous memory leaks at application shutdown
This commit is contained in:
@@ -242,6 +242,16 @@ void egl_deinitialize(void * opaque)
|
||||
|
||||
LG_LOCK_FREE(this->lock);
|
||||
|
||||
eglMakeCurrent(this->display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
|
||||
|
||||
if (this->frameContext)
|
||||
eglDestroyContext(this->display, this->frameContext);
|
||||
|
||||
if (this->context)
|
||||
eglDestroyContext(this->display, this->context);
|
||||
|
||||
eglTerminate(this->display);
|
||||
|
||||
free(this);
|
||||
}
|
||||
|
||||
|
@@ -154,8 +154,12 @@ void egl_splash_free(EGL_Splash ** splash)
|
||||
if (!*splash)
|
||||
return;
|
||||
|
||||
egl_model_free(&(*splash)->bg );
|
||||
egl_model_free(&(*splash)->logo);
|
||||
|
||||
egl_shader_free(&(*splash)->bgShader );
|
||||
egl_shader_free(&(*splash)->logoShader);
|
||||
|
||||
free(*splash);
|
||||
*splash = NULL;
|
||||
}
|
||||
@@ -174,4 +178,4 @@ void egl_splash_render(EGL_Splash * splash, float alpha, float scaleY)
|
||||
egl_model_render(splash->logo);
|
||||
|
||||
glDisable(GL_BLEND);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user