From 6f6ee16cf3c4dfe9220c828cafd9281cb0b30128 Mon Sep 17 00:00:00 2001 From: goyuken Date: Sat, 8 Dec 2012 16:07:06 +0000 Subject: [PATCH] C64: fix unmanaged memory leak in most recent commit --- BizHawk.Emulation/Computers/Commodore64/C64.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/BizHawk.Emulation/Computers/Commodore64/C64.cs b/BizHawk.Emulation/Computers/Commodore64/C64.cs index 2aee37c0b0..ab147ac3ca 100644 --- a/BizHawk.Emulation/Computers/Commodore64/C64.cs +++ b/BizHawk.Emulation/Computers/Commodore64/C64.cs @@ -85,7 +85,14 @@ namespace BizHawk.Emulation.Computers.Commodore64 }; // framework - public void Dispose() { } + public void Dispose() + { + if (board.sid != null) + { + board.sid.Dispose(); + board.sid = null; + } + } // process frame public void FrameAdvance(bool render, bool rendersound)