freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] Leaking FT_Glyph_To_Bitmap


From: Patrick Hoffmann
Subject: [Devel] Leaking FT_Glyph_To_Bitmap
Date: Fri, 17 Jan 2003 15:56:21 +0100

Hi freetype folx...

I found a leak (or a misktake of myself ;) in FreeType 2.

When I user FT_Glyph_To_Bitmap() I need to delete the bitmap buffer and
the bitmap it self by my own. I didn't found any hint about that in the
documentation, so I think this might be a memory leak bug.

Any ideas?

Here is the code...

        FT_Glyph        image = it->m_ftglyph;

        e = FT_Glyph_To_Bitmap( &image, ft_render_mode_normal, &pen, 0
);
        if( !e )
        {
                FT_BitmapGlyph  bit = (FT_BitmapGlyph)image;

                Driver_Display_Bitmap( ... );

                // Undocumented: must delete these both...
                delete [] bit->bitmap.buffer;
                delete bit;
        }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]