From 10e996c96cb99227e59a390d0cb0940608a68fe1 Mon Sep 17 00:00:00 2001 From: Alexander Eckart Date: Thu, 15 Mar 2012 07:33:09 +0100 Subject: [PATCH] fixed memory leak in COpenGL.cs --- Vocaluxe/Lib/Draw/COpenGL.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Vocaluxe/Lib/Draw/COpenGL.cs b/Vocaluxe/Lib/Draw/COpenGL.cs index ae42fcb7..5564610d 100644 --- a/Vocaluxe/Lib/Draw/COpenGL.cs +++ b/Vocaluxe/Lib/Draw/COpenGL.cs @@ -464,6 +464,9 @@ namespace Vocaluxe.Lib.Draw { GL.CallList(list); } + if (_GLList.Count > 0) + GL.DeleteLists(_GLList[0], _GLList.Count); + _GLList.Clear(); _Run = CGraphics.UpdateGameLogic(_Keys, _Mouse); @@ -1437,6 +1440,7 @@ namespace Vocaluxe.Lib.Draw texture.TexturePath = String.Empty; _Textures[index] = texture; + q.data = null; _Queque.RemoveAt(0); } }