#include <include/flecs.h> FLECS_API void ecs_delete(ecs_world_t *world, ecs_entity_t entity)
Delete an entity. This operation will delete an entity and all of its components. The entity id will be recycled. Repeatedly calling ecs_delete without ecs_new, ecs_new_w_id or ecs_new_w_type will cause a memory leak as it will cause the list with ids that can be recycled to grow unbounded.
world- The world.
entity- The entity.
- Designing with Flecs / Annotations
- Manual / Id recycling
- Manual / Generations
- Manual / Manual id generation
- Manual / Id ranges
- MigrationGuide / Entity ids