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;
}
IntPtr Causing Memory Leak?
Page 1 of 11 Replies - 475 Views - Last Post: 09 April 2011 - 12:23 PM
#1
IntPtr Causing Memory Leak?
Posted 09 April 2011 - 12:08 PM
This function is in a loop. When I run the program, the line with IntPtr is giving me memory problems, I've put delete[], but it still doesn't solve the memory problem, can anyone help please? thanks
Replies To: IntPtr Causing Memory Leak?
Page 1 of 1
|
|

New Topic/Question
Reply


MultiQuote





|