voodoochile
New member
- Joined
- Dec 9, 2003
- Messages
- 2
I have written a program in VB.Net that essentailly can create a mosaic picture. It opens the smaller tile pictures, does some processing, and then weaves the smaller tiles into the larger mosaic picture. The program works fine except that with large images (over about 2000x2000 pixels), I get an "Out of Memory Error".
I am running the program on a Windows 2K, P4, with 512MB of RAM and the VM set at about 1.5GB. As I watch in the Performance section of the Task Manager, the program usually only takes about 20MB, but the VM obviously is out of control.
I am using 2 graphics objects and 2 bitmap objects as I shuffle the images around in processing. In each pass through the loop building my mosaic, I am using a:
graphics = nothing
graphics.dispose()
-- or a --
bitmap = nothing
bitmap.dispose()
So I think I am releasing my stored resources. What can be done to either be more efficient with clearing the memory or using the variables in a cleaner way?
I am running the program on a Windows 2K, P4, with 512MB of RAM and the VM set at about 1.5GB. As I watch in the Performance section of the Task Manager, the program usually only takes about 20MB, but the VM obviously is out of control.
I am using 2 graphics objects and 2 bitmap objects as I shuffle the images around in processing. In each pass through the loop building my mosaic, I am using a:
graphics = nothing
graphics.dispose()
-- or a --
bitmap = nothing
bitmap.dispose()
So I think I am releasing my stored resources. What can be done to either be more efficient with clearing the memory or using the variables in a cleaner way?