summaryrefslogtreecommitdiff
path: root/tests/test_synthesis.cpp
diff options
context:
space:
mode:
authorJohn Glover <j@johnglover.net>2013-06-07 13:00:55 +0200
committerJohn Glover <j@johnglover.net>2013-06-07 13:00:55 +0200
commitd60bbc935a1c7137c766792bf569ea7d6800fba9 (patch)
tree2247eb781e2b2f28a1f13253517b2c5eed11a3ae /tests/test_synthesis.cpp
parentd91fc3a5b7b9d7a4ca85882b029fefe2c8daa156 (diff)
downloadsimpl-d60bbc935a1c7137c766792bf569ea7d6800fba9.tar.gz
simpl-d60bbc935a1c7137c766792bf569ea7d6800fba9.tar.bz2
simpl-d60bbc935a1c7137c766792bf569ea7d6800fba9.zip
Fix memory leaks in peak detection processes
Diffstat (limited to 'tests/test_synthesis.cpp')
-rw-r--r--tests/test_synthesis.cpp8
1 files changed, 1 insertions, 7 deletions
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];
}
}