From 77a8476c8078b66b02f87fd60b7f9d4684758a41 Mon Sep 17 00:00:00 2001 From: James Chen Date: Wed, 12 Mar 2014 21:45:57 +0800 Subject: [PATCH] GLView::end needs to release self. --- cocos/2d/platform/desktop/CCGLView.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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()