-
Notifications
You must be signed in to change notification settings - Fork 664
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
Landstalker: remove global ref to multiworld #4175
Conversation
`cached_spheres` holds a reference to the multiworld, which leaks the multiworld if multidata is skipped. Instead of making it a class variable, give a reference to each matching world.
@Dinopony as world maintainer |
Looks good to me, is there anything I must do for it to be merged? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM. It generates just fine still and spoilers before/after are identical
@Dinopony Generally, you can just leave an approving review and say what you tested. Should be able to go to "Files changed" and then "Review Changes" |
Managed to test generating a few random seeds, it appears to be working. Thanks for making that change 👍 |
If it cleans up correctly now anyway, is the modify multidata actually still necessary? |
I don't know but I suppose so. |
What is this fixing or adding?
LandstalkerWorld's
cached_spheres
holds a reference to the multiworld, which leaks the multiworld if multidata is skipped. Instead of making it a class variable, give a reference to each matching world. These count as circular references, so the multiworld is correctly GC'ed even if multidata is skipped.How was this tested?
Run on console:
python Generate.py --seed=42 --skip_output
Before:
After: (no error)