Graphics 800,600 Local a:tpixmap = LoadPixmap("max.png") local b:tpixmap = a DrawPixmap b,100,100 Flip WaitKey()
When variables a and b are out of scope the pixmap will be gcollected.
<edit>
Using a:tpixmap=new tpixmap probably isn't a good example with tpixmap as it will be created without surface info.