Is it possible rather than manually ent_remove() everything? And then simple ALL_ENTITIES = NULL; Any function for this?

Because I want to make a restart button but the game will crash (due to my bad programming) if I didn't remove all active entities properly .