이 함수는 반복됩니다. 내가 프로그램을 실행할 때, IntPtr이있는 라인이 나에게 메모리 문제를주고있다, 나는 delete []를 넣었다. 그러나 여전히 메모리 문제를 해결하지 못한다. 아무도 도와 줄 수 없다? IntPtr이 메모리 누수의 원인입니까?
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이 코드는 컴파일 오히려 슬픈
언어 및 플랫폼이 무엇인지 적어도 말할 수 있습니까? –
음, 이건 C++ \ cli – Qmage
* 메모리에 문제가 있습니까? –