先确认你的内存释放函数确实被调用了,加断点看看,或者直接加一句afxmessagebox()之类.....确认内存被释放了

解决方案 »

  1.   

    谢谢回复,我确定那块内存释放了,调试过了,用过waveout××函数嘛,真是郁闷,看不出哪里内存泄漏啊,而且,用BoudsChecker显示没有内存泄漏啊,
    请多多指教~~
      

  2.   

    那你把代码给我发过来。我看一下。是否有什么代码上的漏洞。
    [email protected]
      

  3.   

    提个意见,仅供参考:
    MSDN上,waveOutUnprepareHeader
    The waveOutUnprepareHeader function cleans up the preparation performed by the waveOutPrepareHeader function. This function must be called after the device driver is finished with a data block. You must call this function before freeing the buffer.注意最后一句:先调用这个函数,再释放缓冲区。就是说,你把
                   delete []hdr->lpData;
        hdr->lpData = NULL;
    放到这个函数调用后面试试看。