-
-
Notifications
You must be signed in to change notification settings - Fork 323
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 issues with Atlas leaking memory. #721
Conversation
48879c3
to
de8d45e
Compare
Made it private instead, no need to expose more API surface just to fix a leak. |
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
de8d45e
to
15343ad
Compare
src/text/atlas.rs
Outdated
@@ -184,4 +190,8 @@ impl Atlas { | |||
); | |||
} | |||
} | |||
fn delete(&mut self) { | |||
let ctx = &mut get_context().quad_context; | |||
ctx.delete_texture(self.texture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we used to have delete
on everything, but now, with Drop, should it really be a separate function, not just drop
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's fair, it's probably an entirely unnecessary convention to follow now, I'll remove the delete function and just have the Drop impl :)
.. Deleted the delete function :D
Thanks for PR! 👍 |
Split this out from the other PR so at least this change would go in, since it seems mostly unproblematic :)