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 memory leak and data race #1217

Merged
merged 1 commit into from
Aug 21, 2021
Merged

Fix memory leak and data race #1217

merged 1 commit into from
Aug 21, 2021

Conversation

gavinbeatty
Copy link
Contributor

  • Delete previous Layout before creating next one, and in destructor
  • Use stack XKBContext instead of local new+delete
  • Lock mutex in update() as it is called from a different thread than onEvent(res)

- Delete previous Layout before creating next one, and in destructor
- Use stack XKBContext instead of local new+delete
- Lock mutex in update() as it is called from a different thread than onEvent(res)
@gavinbeatty
Copy link
Contributor Author

I see sway/language is being actively developed, so just suggesting a minimal fix for the leak and data race instead of #1194.

@gavinbeatty
Copy link
Contributor Author

Based on looking at some other open PRs, it looks like continuous-integration/travis-ci doesn't finish, so presumably this has passed CI.

@Alexays
Copy link
Owner

Alexays commented Aug 21, 2021

lgtm, thanks!

@Alexays Alexays merged commit ab38f13 into Alexays:master Aug 21, 2021
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