ptr_remove(void* object)
Removes an engine object.
Parameters:
object - pointer of the engine object to be
removed; ENTITY*, STRING*, BMAP*, VIEW*, PANEL*, TEXT*, FONT*, SOUND*, or MATERIAL* pointers are supported by this function.
Returns:
NULL
Speed:
Medium
Remarks:
- This function is the opposite of the .._create functions. It can remove dynamically created as well as statically defined objects.
- The pointer
of a
removed object becomes invalid and must not be used anymore. Removing an already removed object will cause a crash.
-
Removing an object does not automatically set its pointers to NULL. The safe_remove macro (defined in acknex.h) removes an object and delectes its pointer to prevent further access to it.
- Entities can also be removed by the ent_remove function.
Example:
ptr_remove(me); // Removes the me entity
See also:
ent_create,
ptr_for_handle, handle, ptr_first
► latest
version online