Mercurial > otakunoraifu
comparison music2/wavfile.cc @ 7:fa8511a21d05
Fixes somes memory leaks
author | thib |
---|---|
date | Tue, 05 Aug 2008 10:06:04 +0000 |
parents | 223b71206888 |
children | 55b577e5f5b5 |
comparison
equal
deleted
inserted
replaced
6:2c890434e30f | 7:fa8511a21d05 |
---|---|
350 }; | 350 }; |
351 | 351 |
352 static int conv_wave_rate(short* in_buf, int length, int in_rate, int out_rate, char* tmpbuf); | 352 static int conv_wave_rate(short* in_buf, int length, int in_rate, int out_rate, char* tmpbuf); |
353 WAVFILE_Converter::~WAVFILE_Converter() { | 353 WAVFILE_Converter::~WAVFILE_Converter() { |
354 if (cvt) { | 354 if (cvt) { |
355 if (cvt->buf) delete cvt->buf; | 355 if (cvt->buf) delete[] cvt->buf; |
356 delete cvt; | 356 delete cvt; |
357 cvt = 0; | 357 cvt = 0; |
358 } | 358 } |
359 if (original) delete original; | 359 if (original) delete original; |
360 original = 0; | 360 original = 0; |