Fixed memory leak caused by glutMainLoop() not returning.

Fixed memory leak by allowing glutMainLoop() to return to allow for the scene and streams to be released.
pull/3036/head
Marc-Antoine Lortie 2020-03-06 13:28:05 -05:00
parent 673a1dcea5
commit c620e9a2ac
1 changed files with 3 additions and 2 deletions

View File

@ -15,9 +15,9 @@
#include <stdio.h>
#ifdef __APPLE__
#include <glut.h>
#include <freeglut.h>
#else
#include <GL/glut.h>
#include <GL/freeglut.h>
#endif
/* assimp include files. These three are usually needed. */
@ -392,6 +392,7 @@ int main(int argc, char **argv)
glutInitWindowPosition(100,100);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutInit(&argc, argv);
glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
glutCreateWindow("Assimp - Very simple OpenGL sample");
glutDisplayFunc(display);