この関数はループしています。プログラムを実行すると、IntPtr の行でメモリの問題が発生します。delete[] を配置しましたが、それでもメモリの問題は解決しません。誰か助けてください。ありがとう
void showImage(IplImage *img,System::Windows::Forms::PictureBox^ picturebox)
{
IntPtr ip(new unsigned char[img->widthStep*img->height]); // this line causing memory usage to keep going up very fast
//memcpy(ip.ToPointer(),img->imageData,img->widthStep*img->height);
//picturebox->Image = gcnew Bitmap(img->width,img->height, img->widthStep, System:rawing::Imaging::PixelFormat::Format24bppRgb, ip);
delete[] ip;
}
これは C++\CLI です