-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[Merged by Bors] - run clear trackers on render world #6878
Conversation
We should probably add some docs to sub apps that they need to add clear_trackers to the sub app too or just call it for every sub app world somewhere, but not sure there's a good place for that. |
would it be better to call it here: bevy/crates/bevy_app/src/app.rs Line 154 in 530be10
and add sub_app.app.world.clear_trackers(); |
That works. Last night I was a little worried what that would mean for pipelined rendering, but I can put it in the sub app run function in that pr. |
a971b74
to
9b13f4d
Compare
Moved the call to clear_trackers into It does bring up the question of whether I should move the call for the main world into |
Probably should since it's currently only found via a runtime addition to |
bors r+ |
# Objective - Fixes #6417 ## Solution - clear_trackers was not being called on the render world. This causes the removed components vecs to continuously grow. This PR adds clear trackers to the end of RenderStage::Cleanup ## Migration Guide The call to `clear_trackers` in `App` has been moved from the schedule to App::update for the main world and calls to `clear_trackers` have been added for sub_apps in the same function. This was due to needing stronger guarantees. If clear_trackers isn't called on a world it can lead to memory leaks in `RemovedComponents`.
# Objective - Fixes bevyengine#6417 ## Solution - clear_trackers was not being called on the render world. This causes the removed components vecs to continuously grow. This PR adds clear trackers to the end of RenderStage::Cleanup ## Migration Guide The call to `clear_trackers` in `App` has been moved from the schedule to App::update for the main world and calls to `clear_trackers` have been added for sub_apps in the same function. This was due to needing stronger guarantees. If clear_trackers isn't called on a world it can lead to memory leaks in `RemovedComponents`.
# Objective - Fixes bevyengine#6417 ## Solution - clear_trackers was not being called on the render world. This causes the removed components vecs to continuously grow. This PR adds clear trackers to the end of RenderStage::Cleanup ## Migration Guide The call to `clear_trackers` in `App` has been moved from the schedule to App::update for the main world and calls to `clear_trackers` have been added for sub_apps in the same function. This was due to needing stronger guarantees. If clear_trackers isn't called on a world it can lead to memory leaks in `RemovedComponents`.
Objective
Solution
Migration Guide
The call to
clear_trackers
inApp
has been moved from the schedule to App::update for the main world and calls toclear_trackers
have been added for sub_apps in the same function. This was due to needing stronger guarantees. If clear_trackers isn't called on a world it can lead to memory leaks inRemovedComponents
. If you were ordering systems with clear_trackers this is no longer possible.