Merge pull request #1989 from lioncash/leak

OGL: Fix a memory leak that would occur every time a game is launched
This commit is contained in:
Markus Wick 2015-01-31 23:06:21 +01:00
commit ca5e2e6f16
3 changed files with 3 additions and 0 deletions

View File

@ -24,6 +24,7 @@ protected:
u32 s_opengl_mode; u32 s_opengl_mode;
public: public:
virtual ~cInterfaceBase() {}
virtual void Swap() {} virtual void Swap() {}
virtual void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_OPENGL; } virtual void SetMode(u32 mode) { s_opengl_mode = GLInterfaceMode::MODE_OPENGL; }
virtual u32 GetMode() { return s_opengl_mode; } virtual u32 GetMode() { return s_opengl_mode; }

View File

@ -225,6 +225,7 @@ void VideoBackend::Shutdown()
OSD::DoCallbacks(OSD::OSD_SHUTDOWN); OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
GLInterface->Shutdown(); GLInterface->Shutdown();
delete GLInterface;
} }
void VideoBackend::Video_Cleanup() void VideoBackend::Video_Cleanup()

View File

@ -163,6 +163,7 @@ void VideoSoftware::Shutdown()
OSD::DoCallbacks(OSD::OSD_SHUTDOWN); OSD::DoCallbacks(OSD::OSD_SHUTDOWN);
GLInterface->Shutdown(); GLInterface->Shutdown();
delete GLInterface;
} }
void VideoSoftware::Video_Cleanup() void VideoSoftware::Video_Cleanup()