diff --git a/cocos/2d/platform/desktop/CCGLView.cpp b/cocos/2d/platform/desktop/CCGLView.cpp index 1f140dafde..0b4dcc7e11 100644 --- a/cocos/2d/platform/desktop/CCGLView.cpp +++ b/cocos/2d/platform/desktop/CCGLView.cpp @@ -386,7 +386,8 @@ void GLView::end() glfwSetWindowShouldClose(_mainWindow,1); _mainWindow = nullptr; } - + // Release self. Otherwise, GLView could not be freed. + release(); } void GLView::swapBuffers()