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

Implement a more robust cleanup strategy #11

Merged
merged 7 commits into from
Nov 10, 2024
Merged

Implement a more robust cleanup strategy #11

merged 7 commits into from
Nov 10, 2024

Conversation

TeddiO
Copy link
Owner

@TeddiO TeddiO commented Nov 10, 2024

It looks like something has changed for linux srcds where it's definitely cleaning up objects, possibly due to how it might be killing the internal processes / memory. Instead of doing an OS check, we check to see now if instance is not NULL, and if it isn't we attempt to destroy it.

Furthermore, we encapsulate this in the static function void Fwens::Destroy() so that way the binary has a standard way of dealing with it. Doing it this way means that in future, should anything change in terms of how modules get unloaded on Windows (where instance can become NULL), these changes will already account for that. The same goes for Linux, where if the instance is no longer NULL, we'll attempt to clean it up!

Closes #10

@TeddiO TeddiO self-assigned this Nov 10, 2024
@TeddiO TeddiO added the question Further information is requested label Nov 10, 2024
@TeddiO TeddiO changed the title Some initial considerations / checks Implement a more robust cleanup strategy Nov 10, 2024
@TeddiO TeddiO marked this pull request as ready for review November 10, 2024 13:03
@TeddiO TeddiO merged commit deffd88 into master Nov 10, 2024
6 checks passed
@TeddiO TeddiO deleted the exists-check branch November 10, 2024 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Investigate better cleanup on Linux binaries
1 participant