From 108722bed04d65819dae76cf09874e5256252f4a Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Mon, 26 Dec 2011 10:27:18 -0500 Subject: [PATCH] oops, forgot to make sure the gl program is actually free'd. --- Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | 3 +++ Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h | 1 + 2 files changed, 4 insertions(+) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 387996a957..eeb9614070 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -219,7 +219,10 @@ void ProgramShaderCache::Shutdown(void) { PCache::iterator iter = pshaders.begin(); for (; iter != pshaders.end(); ++iter) + { g_program_disk_cache.Append(iter->second.uid, iter->second.GetProgram(), iter->second.Size()); + iter->second.FreeProgram(); + } g_program_disk_cache.Sync(); g_program_disk_cache.Close(); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h index d0743326dd..6089f205e7 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h @@ -100,6 +100,7 @@ public: void FreeProgram() { delete [] binary; + binary = NULL; } GLint Size()