From d60bbc935a1c7137c766792bf569ea7d6800fba9 Mon Sep 17 00:00:00 2001 From: John Glover Date: Fri, 7 Jun 2013 13:00:55 +0200 Subject: Fix memory leaks in peak detection processes --- tests/test_synthesis.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'tests/test_synthesis.cpp') diff --git a/tests/test_synthesis.cpp b/tests/test_synthesis.cpp index 96b8f4d..c861be0 100644 --- a/tests/test_synthesis.cpp +++ b/tests/test_synthesis.cpp @@ -163,13 +163,8 @@ void TestSMSSynthesis::setUp() { // so pass peak data to find_partials before calling the // main test function for(int i = 0; i < _pt.max_frame_delay(); i++) { - Peak* p = new Peak(); - p->amplitude = 0.4; - p->frequency = 220; - _peaks.push_back(p); - Frame* f = new Frame(); - f->add_peak(p); + f->add_peak(0.4, 220.0, 0.0, 0.0); _frames.push_back(f); } _pt.find_partials(_frames); @@ -177,7 +172,6 @@ void TestSMSSynthesis::setUp() { void TestSMSSynthesis::tearDown() { for(int i = 0; i < _pt.max_frame_delay(); i++) { - delete _peaks[i]; delete _frames[i]; } } -- cgit v1.2.3