Board index » cppbuilder » How to make sure the memory has be released
YHWu912
CBuilder Developer |
How to make sure the memory has be released2006-08-28 01:59:44 PM cppbuilder82 Dear Someone I have a problem about new/delete ,this code is a recorder project,it will stop when the slient event haapened and then write a wave file,and continue record. In my code ,I have new 2 class and new a array , when stop function called ,they should be destory but memory isn't be released,why??Could someone help me to solve it??thanks... //New------------------------------------------------------------------------------------------------------------------ m_WaveFile = new CWaveFile(Nombre,FrecMuestreo,Resolucion,m_TamBuffer); Audio = new CAudioCap(Edit1->Text.c_str(),m_Frecuencia,m_Sample); m_Buffer = new byte[m_TamBuffer]; //Delete--------------------------------------------------------------------------------------------------------------- delete [](m_Buffer); delete (Form1->Audio); delete m_WaveFile; //------------------------------------------------------------------------------------------------------------------------- |