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

Font atlas memory leak #627

Open
andreymal opened this issue Aug 6, 2023 · 0 comments
Open

Font atlas memory leak #627

andreymal opened this issue Aug 6, 2023 · 0 comments

Comments

@andreymal
Copy link

loop {
    load_ttf_font("./font.ttf").await?;
}

Both system RAM and GPU memory are leaking.

I tried to implement Drop for Atlas like in 65451f5:

impl Drop for Atlas {
    fn drop(&mut self) {
        get_context().quad_context.delete_texture(self.texture);
    }
}

and this fixed the leak (but I'm not sure if this solution is complete and/or correct)

profan added a commit to profan/macroquad that referenced this issue Apr 30, 2024
* Fix issue with Audio leaking memory when loaded by adding a drop impl, reported in issue not-fl3#628
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
* Fix issue with RenderTarget leaking memory by adding a drop impl, reported in issue not-fl3#635
profan added a commit to profan/macroquad that referenced this issue Apr 30, 2024
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
* Fix issue with RenderTarget leaking memory by adding a drop impl, reported in issue not-fl3#635
profan added a commit to profan/macroquad that referenced this issue Apr 30, 2024
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
* Fix issue with RenderTarget leaking memory by adding a drop impl, reported in issue not-fl3#635
profan added a commit to profan/macroquad that referenced this issue May 2, 2024
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
profan added a commit to profan/macroquad that referenced this issue May 2, 2024
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
profan added a commit to profan/macroquad that referenced this issue May 2, 2024
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue not-fl3#627
not-fl3 pushed a commit that referenced this issue May 3, 2024
* Fix issue with Font Atlas leaking memory by adding a drop impl, reported in issue #627
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

No branches or pull requests

1 participant