DbDeleteSprite

This command removes a given sprite from the Dark GDK system.

Syntax
void dbDeleteSprite ( int iSprite )

Usage
void dbDeleteSprite ( 1 ) ;

This would remove sprite number 1 from memory. Dark GDK tracks all sprites that have been created using the dbSprite functions. It must check all existing sprites and process them to some extent, even if it's only to note that they're hidden and don't need to be displayed. By using the dbDeleteSprite command to remove the sprite from memory it reduces the amount of work that Dark GDK needs to do each cycle.

Other considerations
Deleting a sprite may not be desirable if it will be needed later, especially if it needs further processing like sizing, diffusing, etc. Hiding the sprite will cause it to disappear, but there is still a bit of minimal processing necessary to track all sprites in the system.