Skip to content

Commit

Permalink
remember to flush world
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanSWard committed Jun 20, 2021
1 parent 7604709 commit e8668e2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions crates/bevy_ecs/src/system/commands/command_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ impl CommandQueue {
/// This clears the queue.
#[inline]
pub fn apply(&mut self, world: &mut World) {
// flush previouly queued entities
world.flush();

// SAFE: In the iteration below, `meta.func` will safely consume and drop each pushed command.
// This operation is so that we can reuse the bytes `Vec<u8>`'s internal storage and prevent
// unnecessary allocations.
Expand Down

0 comments on commit e8668e2

Please sign in to comment.