From 1e3c46a6bba1591dc161d25001f9412b3c514a07 Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Wed, 20 Jul 2016 10:00:00 +0200 Subject: [PATCH] gsdx ogl: purge debug message in destructor Allow to see latest error and avoid noise in Valgrind log --- plugins/GSdx/GSDeviceOGL.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/GSdx/GSDeviceOGL.cpp b/plugins/GSdx/GSDeviceOGL.cpp index 8aa1533198..6bf5caf837 100644 --- a/plugins/GSdx/GSDeviceOGL.cpp +++ b/plugins/GSdx/GSDeviceOGL.cpp @@ -138,6 +138,10 @@ GSDeviceOGL::~GSDeviceOGL() // Must be done after the destruction of all shader/program objects delete m_shader; m_shader = NULL; + + // Purge any pending message to reduce noise in Valgrind (potential memory leak + // in Mesa driver that doesn't free internal buffer when the context is destroyed) + CheckDebugLog(); } void GSDeviceOGL::GenerateProfilerData()