From 292354e180a0d37926fcf68419ac5ce80b0f906d Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 10 Mar 2015 11:33:49 -0700 Subject: [PATCH 1/2] manually call delete on GLCanvas in Application dtor --- interface/src/Application.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 6945e88949..aa5d0bfb88 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -602,7 +602,9 @@ Application::~Application() { _myAvatar = NULL; - ModelEntityItem::cleanupLoadedAnimations() ; + ModelEntityItem::cleanupLoadedAnimations(); + + delete _glWidget; DependencyManager::destroy(); DependencyManager::destroy(); @@ -614,7 +616,7 @@ Application::~Application() { } void Application::initializeGL() { - qDebug( "Created Display Window."); + qDebug() << "Created Display Window."; // initialize glut for shape drawing; Qt apparently initializes it on OS X #ifndef __APPLE__ @@ -629,7 +631,7 @@ void Application::initializeGL() { #ifdef WIN32 GLenum err = glewInit(); if (GLEW_OK != err) { - /* Problem: glewInit failed, something is seriously wrong. */ + /* Problem: glewInit fa iled, something is seriously wrong. */ qDebug("Error: %s\n", glewGetErrorString(err)); } qDebug("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION)); From a8046b8316bf477073fa37910fdf942f43146fcb Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 10 Mar 2015 11:47:35 -0700 Subject: [PATCH 2/2] fix a typo in comment, NULL glWidget pointer --- interface/src/Application.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index aa5d0bfb88..0182e6e195 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -605,6 +605,7 @@ Application::~Application() { ModelEntityItem::cleanupLoadedAnimations(); delete _glWidget; + _glWidget = NULL; DependencyManager::destroy(); DependencyManager::destroy(); @@ -631,7 +632,7 @@ void Application::initializeGL() { #ifdef WIN32 GLenum err = glewInit(); if (GLEW_OK != err) { - /* Problem: glewInit fa iled, something is seriously wrong. */ + /* Problem: glewInit failed, something is seriously wrong. */ qDebug("Error: %s\n", glewGetErrorString(err)); } qDebug("Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));