eraseing all refrences to the image and flushmem does not free it.
That's because you aren't using references. you have to use the Release command
Well that, or you have to use objects.Print MemAlloced()+" beginning" Graphics 800,600 Print MemAlloced()+" after graphics" Local i:TImage=CreateImage(400,400) Print MemAlloced()+" after createimage" i=Null 'Release i Print MemAlloced()+" after release image" flushmem Print MemAlloced()+" after flushmem" EndGraphics Print MemAlloced()+" after endgraphics" endRead this thread for more information on how the "Garbage Collector" works.