From 16d17a3ab3a5d0b809d082ca49e4bd4e90da3bef Mon Sep 17 00:00:00 2001 From: Andrea Odetti Date: Sun, 5 Jul 2020 14:51:51 +0100 Subject: [PATCH] Partially revert memory leak fix(ed upstream). Signed-off-by: Andrea Odetti --- source/RGBMonitor.cpp | 7 ------- source/RGBMonitor.h | 2 -- source/linux/duplicates/Video.cpp | 1 - 3 files changed, 10 deletions(-) diff --git a/source/RGBMonitor.cpp b/source/RGBMonitor.cpp index 4420858b..c4fcaf00 100644 --- a/source/RGBMonitor.cpp +++ b/source/RGBMonitor.cpp @@ -732,13 +732,6 @@ void VideoInitializeOriginal(baseColors_t pBaseNtscColors) PalIndex2RGB[HGR_VIOLET] = PalIndex2RGB[MAGENTA]; } -void VideoDestroyOriginal() -{ - delete [] g_pSourcePixels; - g_pSourcePixels = NULL; -} - - //=========================================================================== static UINT g_rgbFlags = 0; diff --git a/source/RGBMonitor.h b/source/RGBMonitor.h index 180b9f3e..14cb72c0 100644 --- a/source/RGBMonitor.h +++ b/source/RGBMonitor.h @@ -7,8 +7,6 @@ void UpdateDLoResCell(int x, int y, uint16_t addr, bgra_t *pVideoAddress); const UINT kNumBaseColors = 16; typedef bgra_t (*baseColors_t)[kNumBaseColors]; void VideoInitializeOriginal(baseColors_t pBaseNtscColors); -void VideoDestroyOriginal(); - void RGB_SetVideoMode(WORD address); bool RGB_Is140Mode(void); diff --git a/source/linux/duplicates/Video.cpp b/source/linux/duplicates/Video.cpp index ddb5affb..b9d175bd 100644 --- a/source/linux/duplicates/Video.cpp +++ b/source/linux/duplicates/Video.cpp @@ -133,7 +133,6 @@ void VideoDestroy () { g_pFramebufferinfo = NULL; free(g_pFramebufferbits); g_pFramebufferbits = NULL; - VideoDestroyOriginal(); }