Using the TPicture:MakeThumbNail() method inside a loop, we noticed that it was consuming
too much memory. Even calling one of the destructors, :END(), :DESTROY() or FREE() in each
iteration, it was not releasing the allocated memory.
As we were dealing with 12 thousand images, the method consumed 8GB RAM quickly.
Using the function CreateThumbNail(), this did not happen.
Sample codes:
Did not work:
Código: Seleccionar todo
DO WHILE i < 10000
WITH OBJECT o01 := TPicture():Create()
:LoadFromFile("C:\IMG1.JPG")
:MakeThumbnail( :nWidth, :nHeight)
:End()
//:Destroy() or :Free() did not work too
END
i++
ENDDO
Código: Seleccionar todo
DO WHILE i < 10000
CreateThumbnail(HB_MemoRead("C:\IMG1.JPG"))
i++
ENDDO
André Corrêa