How to clear out of memory error?

  • Thread starter Thread starter Rich P
  • Start date Start date
R

Rich P

I created a slide show program in VB.net 2005. I use a delegate for
multi-threading. The app runs a continuous loop of pic files which are
displayed in a picture box (image box - some pic control from the
toolbox). The separate threads is so I can stop the loop and restart it
(and really because I wanted to experiment with delegages). I can
loop/show thousands of pic files for hours with this app if the pic
files are mostly smaller than 1 meg. But if I loop through a set of pic
files that are all between 2-4 megs in size - after showing only 50-60
pics I get an unhandled excetion error followed by an out of memory
error. I have run registry cleaner to help clear out the "Out Of
Memory" error ... I only get the error with the large pic files. When I
run files that are mostly smaller than 1 meg it runs fine for hours.

I want to clear the memory, stack, whatever it is I need to clear out
after each picture has been displayed in hopes of preventing this
unhandled exception. Anyone know how I go about this? or a way to clear
the memory?

Thanks,

Rich
 
Back
Top