Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent Iterator invalidation #62

Open
Ukendio opened this issue Jul 6, 2024 · 0 comments
Open

Prevent Iterator invalidation #62

Ukendio opened this issue Jul 6, 2024 · 0 comments

Comments

@Ukendio
Copy link
Owner

Ukendio commented Jul 6, 2024

Adding a new entity that satisfies the conditions of the query will cause the iterator to go on forever. This is the most dangerous case that could happen.

Other cases which cause UB are:

  • deleting an entity that is not the currently iterated one, which will swap remove its current row and the last row of the archetype
  • adding/removing a component that cause it to move to an adjacent archetype and cause the entity to be iterated more than once
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant