Skip to content

fix(client): remove the global options added by a script when it is s…#190

Open
Luccboy wants to merge 1 commit intooverextended:mainfrom
Luccboy:fix/remove-globaloptions
Open

fix(client): remove the global options added by a script when it is s…#190
Luccboy wants to merge 1 commit intooverextended:mainfrom
Luccboy:fix/remove-globaloptions

Conversation

@Luccboy
Copy link
Copy Markdown

@Luccboy Luccboy commented Apr 28, 2026

Hi, we noticed some performance issues when adding global options in our own script:
Specifically, the resource usage (observed by the resource monitor) keeps increasing after every restart of the invoking script.
After some investigation, we found that the global options added by an external script are not removed in ox_target when it is stopped.

This pull request properly removes global options added by scripts when they are stopped.
We had to move the definition of the global variable and related api functions before the removeResourceGlobals function that is called in the onClientResourceStop event handler so we can access the variable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant