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

fix: 🐛 potential memory leak with script extensions #522

Merged

Conversation

KANAjetzt
Copy link
Member

Cherry picked #383 for 3.x loader.

* feat: script extensions sorter checks load order (GodotModding#357)

* added a comparator method to sort extensions of the same script

added a comparator method to sort extensions of the same script following the load order

* added a table to avoid iterating through the load order every comparison

* style edits/spacing changes

renamed a var, added spacing to keep the style consistency

* style: added an empty line

* changed get_string_in_between to get_mod_dir

* better description for get_mod_dir

* fix: 🐛 fixed missing script parent path

Before, if the same script was extended multiple times, the `parent_script_path` would be empty for all extensions except the first one.

* fix: ✏️ removed no longer accurate comment
@KANAjetzt KANAjetzt added bug Something isn't working 3.x labels Jan 25, 2025
@KANAjetzt KANAjetzt added this to the 3.x - v6.3.0 milestone Jan 25, 2025
@KANAjetzt KANAjetzt requested a review from Qubus0 January 25, 2025 09:55
@KANAjetzt KANAjetzt self-assigned this Jan 25, 2025
@KANAjetzt KANAjetzt added this pull request to the merge queue Jan 26, 2025
Merged via the queue into GodotModding:development with commit b155e84 Jan 26, 2025
2 checks passed
KANAjetzt added a commit that referenced this pull request Jan 26, 2025
fix: 🐛 fixed missing script parent path (#383)

* feat: script extensions sorter checks load order (#357)

* added a comparator method to sort extensions of the same script

added a comparator method to sort extensions of the same script following the load order

* added a table to avoid iterating through the load order every comparison

* style edits/spacing changes

renamed a var, added spacing to keep the style consistency

* style: added an empty line

* changed get_string_in_between to get_mod_dir

* better description for get_mod_dir

* fix: 🐛 fixed missing script parent path

Before, if the same script was extended multiple times, the `parent_script_path` would be empty for all extensions except the first one.

* fix: ✏️ removed no longer accurate comment
@KANAjetzt KANAjetzt mentioned this pull request Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants