Well, is the memory really occupied, or was it simply not carbage-collected? When you run this test app, how many bytes get lost every loop. What happens when the machine runs out of memory? Can you still start an other app parallel to the test app?
well whatever happens you should know that parallel processes on your machine may force a fragmentation of the ram, even and especially socalled ram-defragmentation.
Fragmentation is the nature of computer media and it doesn't make sense to fight it with deragmentation when you allocate and deallocate Ram that many times.
It would be better to create the images once then reuse them. At least that's a much better programming style.
well whatever happens you should know that parallel processes on your machine may force a fragmentation of the ram, even and especially socalled ram-defragmentation.
Fragmentation is the nature of computer media and it doesn't make sense to fight it with deragmentation when you allocate and deallocate Ram that many times.
It would be better to create the images once then reuse them. At least that's a much better programming style.