Code
Graphics3D 640,480
AppTitle "FreeEntity Example"
Cam = CreateCamera()
Lit = CreateLight()
PositionEntity Lit,-5,-5,0
PositionEntity Cam,0,0,-5
AnEntity = CreateCube() ; This is our Test Entity
RotateMesh AnEntity,45,45,45
While Not KeyDown(1) ; Until we press ESC
If KeyDown(203) Then MoveEntity AnEntity,-0.1,0,0
If KeyDown(205) Then MoveEntity AnEntity,0.1,0,0
If KeyHit(57) Then FreeEntity AnEntity ; Hit Space to Free!
RenderWorld ; Draw the Scene
Text 10,10,"Entity Handle: "+AnEntity
Flip ; Flip it into View
Wend
End