I am working on image processing project,In my application i am processing one by one images from folder(i am processing images in a while loop), folder contains more than 1000 images.i am using the garbage collection(GC.Collect()) for every 4 image count. after processing of 1000 images i a getting OutOfMemoryException(the exception will through when bitmap image is assigning to a picturebox),how to solve this problem?
I am working on image processing project,In my application i am processing one by
Share
That depends on how you are using the images. Chances are that you are not disposing the relevant instance. Try wrapping your instances in a using statement: