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

[Question] why do we need to FT_Done_Library in impl Drop for Glyph and impl Drop for Face #251

Open
lulitao1997 opened this issue Nov 26, 2022 · 1 comment

Comments

@lulitao1997
Copy link

doesn't it causes double free in the real program?
e.g.
i have a function to get some info from a glyph

fn get_glyph_info(face: Face) {
        let glyph = face.glyph().get_glyph().unwrap();
        // do some calculation on glyph
}
@psychon
Copy link

psychon commented Apr 14, 2024

Drive-by-comment: Isn't this reference counted? The call to FT_Done_Library in Glyph::drop:

ffi::FT_Done_Library(self.library_raw)

...goes with the call to FT_Reference_Library in Glyph::from_raw:
ffi::FT_Reference_Library(library_raw);

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

2 participants