struct 中有指针,记得要写析构函数

it2022-05-09  27

struct ImageInfo{ BITMAPINFO header; void* image;

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

要不会有内在泄漏!

转载于:https://www.cnblogs.com/nanshouyong326/archive/2009/08/14/1546188.html


最新回复(0)