From 507fdc9f584cee1fd4c31deef33dba5503c299da Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Fri, 12 Feb 2016 09:26:32 +0100 Subject: [PATCH] Fix the MemoryLeak --- GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h b/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h index 48799048e41..e3964724d43 100644 --- a/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h +++ b/GraphicsView/include/CGAL/Qt/CreateOpenGLContext.h @@ -30,8 +30,10 @@ inline QGLContext* createOpenGLContext() format.setVersion(2,1); format.setProfile(QSurfaceFormat::CompatibilityProfile); context->setFormat(format); + context->create(); QGLContext *result = QGLContext::fromOpenGLContext(context); result->create(); + delete context; return result; }