freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Memory leaks


From: David Turner
Subject: Re: [Freetype] Memory leaks
Date: Wed, 17 Oct 2001 16:15:02 +0200

Hello Dave,

> Dave Williss a écrit :
> 
> Question:
> 
> If I do this...
> 
>     TT_New_Glyph(face, &glyph);
>     for (i = 0 ; i < n ; ++i) {
>         TT_Load_Glyph(instance, glyph, index[i], flags);
>             ... use glyph...
>     }
> 
>     TT_Done_Glyph(glyph)
> 
> Will I be leaking memory on each call to Load Glyph or
> should I create and destroy the glyph handle for each call?
> Seems terribily inefficient but to do that, but doing it as
> above I seem to be leaking memory.
>

No, this is the correct behaviour. Each call to TT_Load_Glyph
overwrites the previous content.. and this was designed on
purpose because the real content of a TT_Glyph object is
_really_ complex with TrueType, and you don't want to create
them on each glyph load..

Regards,

- David



reply via email to

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