近日在调试C++程序中new class 后delete 出现如下错误:
* 0x0000007ff64426f87e(ucrtbased.dll)处(处于dataa.exe中)引发的异常:0xC0000005:读取位置(0xffffffffffffffff)时发生访问冲突。*
bimage *metric=new bimage(image);
xxxx
xxxx
delete metric;
bimage定义:
class bimage{
pubic:
bimage();
bimage(bimage*image){allocate_buf();variable assignment;};
~bimage();
private:
int xx;
uinit32 *buf[4]; //
uint32 **p_buf[4];
bool allocate_buf()
{