Question Locked

Out of Memory Error

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Dear all , I am facing in problem during assigning bmp file to picturebox in vb.net ,it is that 'Out of memory' exception generating.
Note that after every periodic time bmp file is continously assigning to picturebox.

3 replies

by bfilmfan

How much memory is available?

Use Task manager to see that information.

You may well be out of memory.

by tony hopkinson

You are loading a picture into memory, attaching it to the picturebox.

Loading another picture into memory, attaching it to the picture box.

Loading another.......

Eventually you are out of memory.

When you assign the bmp to the picture box, it simply points to the new one, and leaves the old one hanging about, until the application closes.

Before you assign the new one, you need to explicitly dispose of any existing one in the picture box, given of course it's not used elsewhere.

This discussion is closed to new replies.