我想创建一个指针然后读取视频文件并显示,结果出现释放内存异常,异常的部分代码如下
unsigned char * yuvbuf = new unsigned char[FrameSize];//一帧数据大小
fread(yuvbuf, 1, FrameSize, F);
cvSetData(yimg, yuvbuf, nWidth);
cvShowImage("yuv", yimg);
cvReleaseImage(&yimg);
delete []yuvbuf;
使用delete释放yuvbuf后弹出The block at 0x0000021C7E967C20 was not allocated by _aligned routines, use free()请问是什么原因呢?