I have a function that fill data grid view and this function use paging
page size = 30
row[1] = Image.FromFile(iconFullUrl);
in this section of code the error occur
row[1] = Image.FromFile(iconFullUrl);
Adding my Comment as an Answer:
According to MSDN the OutOfMemory error can be caused by the file not having a valid image format or because GDI+ does not support the pixel format of the file.
Also as long as the image is not disposed the file will be marked as inuse
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.