alecthomas / entityx

EntityX - A fast, type-safe C++ Entity-Component system
MIT License
2.23k stars 295 forks source link

Remove components in the reverse order #200

Closed PJK136 closed 7 years ago

PJK136 commented 7 years ago

Especially useful when components have dependencies and need to be removed/destroyed in the opposite order.

alecthomas commented 7 years ago

I don't think this will reliably do what you want. Components are allocated IDs statically by the compiler, so their order is not (necessarly) deterministic. If their order is not deterministic, destruction order won't be either.

PJK136 commented 7 years ago

You're right, sorry for the miss!