DELETE OBJECT This command will delete the specified 3D object previously loaded.
Syntax
    DELETE OBJECT Object Number
Parameters
    Object Number
Integer The object number
Returns
This command does not return a value.
Description
The parameter should be specified using an integer value. When you delete an object, or create for that matter, the engine must recalculate an internal list used for texture sorting, which will make a performance hit on the CPU. It is therefore recommended that you avoid creation/deletion code in your time critical loops such as the main game loop.
Example Code
    sync on : sync rate 0 : hide mouse:cls 0

    ObjectNumber=1

    SecondObject=2

    load object "model.x",ObjectNumber

    load object "model.x",SecondObject

    rotate object ObjectNumber, 270, 0, 0

    fix object pivot ObjectNumber

    point object ObjectNumber,0,0,0

    position object ObjectNumber, 0,0,0

    while mouseclick()=0

    sync

    endwhile

    delete object ObjectNumber

    delete object SecondObject

    end
See also
BASIC3D Commands Menu Index