From b0008d2d33c394fbba358c08b032c5872e6a909d Mon Sep 17 00:00:00 2001 From: athrxx Date: Thu, 21 Apr 2011 20:22:12 +0200 Subject: FM-TOWNS AUDIO: fix memory leak --- audio/softsynth/fmtowns_pc98/towns_euphony.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'audio/softsynth') diff --git a/audio/softsynth/fmtowns_pc98/towns_euphony.cpp b/audio/softsynth/fmtowns_pc98/towns_euphony.cpp index 7c071c43fb..0ad96f76f3 100644 --- a/audio/softsynth/fmtowns_pc98/towns_euphony.cpp +++ b/audio/softsynth/fmtowns_pc98/towns_euphony.cpp @@ -40,6 +40,7 @@ TownsEuphonyDriver::~TownsEuphonyDriver() { delete[] _activeChannels; delete[] _sustainChannels; delete[] _assignedChannels; + delete[] _eventBuffer; delete[] _tEnable; delete[] _tMode; delete[] _tOrdr; @@ -51,6 +52,16 @@ bool TownsEuphonyDriver::init() { if (!_intf->init()) return false; + delete[] _activeChannels; + delete[] _sustainChannels; + delete[] _assignedChannels; + delete[] _eventBuffer; + delete[] _tEnable; + delete[] _tMode; + delete[] _tOrdr; + delete[] _tLevel; + delete[] _tTranspose; + _activeChannels = new int8[16]; _sustainChannels = new int8[16]; _assignedChannels = new ActiveChannel[128]; -- cgit v1.2.3