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

Unregistering callbacks in plugins cleanup. #183

Merged
merged 1 commit into from
Sep 10, 2024

Conversation

MiranDMC
Copy link
Collaborator

No description provided.

@MiranDMC MiranDMC requested a review from x87 September 10, 2024 05:03
CLEO_UnregisterCallback(eCallbackId::GameBegin, OnGameBegin);
CLEO_UnregisterCallback(eCallbackId::GameEnd, OnGameEnd);

patchCTextGet.Apply(); // undo hook
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just FYI, there might be another hook installed on top of CLEO and reverting back to original may affect it. But since it happens on game exit, the impact should be minimal

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All those registers and patches should be handled by some CLEO plugin guard.
Then cleanup would happen automatically in destructor.

@MiranDMC MiranDMC merged commit 53d5198 into master Sep 10, 2024
2 checks passed
@MiranDMC MiranDMC deleted the proper_callback_unregistering branch September 16, 2024 04:37
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.

2 participants