8000 Leak Window object via Box::leak instead of HashMap by est31 · Pull Request #2128 · glium/glium · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Leak Window object via Box::leak instead of HashMap #2128

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

Merged
merged 1 commit into from
Oct 5, 2024

Conversation

est31
Copy link
Collaborator
@est31 est31 commented Oct 5, 2024

The prior code was UB: it's possible that the hash map can move around the objects while it grows. We were leaking previously as well, so this is not much of a regression.

cc prior PR #2127

@OLEGSHA
Copy link
Contributor
OLEGSHA commented Oct 5, 2024

As far as I can tell, this prevents the destructor of Window from ever running. Is this safe on all platforms?

@est31
Copy link
Collaborator Author
est31 commented Oct 5, 2024

static doesn't run destructors either, so it's not a regression. Whether destructors are required or not at all, I don't know. But I'd put that onto a future refactor.

@est31 est31 merged commit cb65afa into glium:master Oct 5, 2024
7 checks passed
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
0