You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maintain a deletion_flag: Vec<bool> and finalizer_count: Vec<AtomicUsize> for each archetype.
Entity creation
Count the components that are finalizers, stored to finalizer_count
Initialize deletion_flag as false.
Entity deletion flagging
Offline mode: accepts an entity: impl entity::Ref, get the raw ID and drop(entity).
Online mode: accepts an entity: impl entity::Ref, get the raw ID, push the raw ID to a sharded queue, process in batch after join.
During offline/join: If finalizer count is zero, proceed to "Entity deletion". Otherwise, set deletion_flag to true to wait for trigger from finalizers.
Component update
If a component is removed and the deletion flag for its entity is true, the entity is queued for finalizer test after join.
Entity deletion
Check the refcount of the entity, ensure that the internal refcount is the only reference.
Loop through all storages, drop the component from the storage if exists.
Deallocate the entity ID.
The text was updated successfully, but these errors were encountered:
Maintain a
deletion_flag: Vec<bool>
andfinalizer_count: Vec<AtomicUsize>
for each archetype.Entity creation
finalizer_count
deletion_flag
as false.Entity deletion flagging
entity: impl entity::Ref
, get the raw ID anddrop(entity)
.entity: impl entity::Ref
, get the raw ID, push the raw ID to a sharded queue, process in batch after join.deletion_flag
to true to wait for trigger from finalizers.Component update
If a component is removed and the deletion flag for its entity is true, the entity is queued for finalizer test after join.
Entity deletion
The text was updated successfully, but these errors were encountered: