struct ImageInfo
{
 BITMAPINFO header;
 void* image;

 ImageInfo()
 {
  image = NULL;
 }

 ~ImageInfo()
 {
  if(image!=NULL)
  {
   delete image;
   image = NULL;
  }
 }
};



结果是当进入函数体就会实例化,而不是执行到它!
所以路途退出时,出会析构错误!呵呵

相关文章:

  • 2021-06-16
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2021-12-01
  • 2021-05-22
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案