In this program, I am creating a new image every loop. After drawing it, I want to free it again. I want to use this for (2d) scaling purposes.
However, in the task manager, I see the memory amount of the program going up. What could be wrong ?
However, in the task manager, I see the memory amount of the program going up. What could be wrong ?
Graphics 800, 600, 0, 3 ;create image im2 = CreateImage(640, 480) SetBuffer ImageBuffer(im2) For i = 0 To 1000 Color 0, 0, Rand($FFFFFF) Oval Rand(640), Rand(480), 64, 64 Next SetBuffer BackBuffer() ;main loop Repeat ;create new image im3 = CreateImage(64, 64) ;copy a part of image2 onto it CopyRect Rand(320), Rand(240), 64, 64, 0, 0, ImageBuffer(im2), ImageBuffer(im3) ;draw the new image DrawImage im3, Rand(800), Rand(600) ;free the image FreeImage im3 im3 = 0 Flip Until KeyHit(1) End