Since the memory usage keeps increasing, the chances are that you are creating things like bitmaps, Graphics objects, handles, and / or related classes which you are not releasing: an "Out of memory" error just means that a requested resource is not available as they are all in use - it's doesn't necessarily refer to actual memory! And since the error occurs on a Graphics creation line, that is most likely the culprit.
So start by wrapping the Graphics context in a
using
block:
using (Graphics g = Graphics.FromImage(Pages(pvDrawPage)))
{
...
}
Using g As Graphics = Graphics.FromImage(Pages(pvDrawPage))
...
End Using
Remember - a Graphics context wraps a Windows Handle - and they are scarce resources shared across the whole system. If your lappy is using a whole bunch of them already then it will run out before your desktop - but that will also run out eventually!