summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorMarkus Wick <markus+github@selfnet.de>2015-01-31 23:06:21 +0100
committerMarkus Wick <markus+github@selfnet.de>2015-01-31 23:06:21 +0100
commitca5e2e6f1615a7243dbf936c06cf6d0b6bf8310a (patch)
treeeac60a08424c9fdca1c21c535c057b0611387ba9 /Source/Core
parent22e27ffd23ee2aa5dc1c7bf36728cc3bff4abd7e (diff)
parent9476756d4388c6e5f639f5cbf979612bff856293 (diff)
Merge pull request #1989 from lioncash/leak
OGL: Fix a memory leak that would occur every time a game is launched
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoBackends/OGL/GLInterfaceBase.h1
-rw-r--r--Source/Core/VideoBackends/OGL/main.cpp1
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/VideoBackends/OGL/GLInterfaceBase.h b/Source/Core/VideoBackends/OGL/GLInterfaceBase.h
index 6f705bbf4f..13f88c8cad 100644
--- a/Source/Core/VideoBackends/OGL/GLInterfaceBase.h
+++ b/Source/Core/VideoBackends/OGL/GLInterfaceBase.h
@@ -24,6 +24,7 @@ protected:
u32 s_opengl_mode;
public:
+ virtual ~cInterfaceBase() {}
virtual void Swap() {}
virtual void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_OPENGL; }
virtual u32 GetMode() { return s_opengl_mode; }
diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp
index 68565e50fd..5cd4f88124 100644
--- a/Source/Core/VideoBackends/OGL/main.cpp
+++ b/Source/Core/VideoBackends/OGL/main.cpp
@@ -225,6 +225,7 @@ void VideoBackend::Shutdown()
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
GLInterface->Shutdown();
+ delete GLInterface;
}
void VideoBackend::Video_Cleanup()
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index 8f7c06c5a8..004ae5e2bf 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -163,6 +163,7 @@ void VideoSoftware::Shutdown()
OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
GLInterface->Shutdown();
+ delete GLInterface;
}
void VideoSoftware::Video_Cleanup()