Quoting Henric Andersson ([EMAIL PROTECTED]):
> I've made a program that uses TrueType fonts quite extensively. What I've noticed is 
>that the program is leaking memory. ALOT of memory. I traced it to the font loading.
> 
> Correct me if I'm wrong, but isn't this how it is supposed to be used:
> 
>       DFBFontDescription font_dsc;
>       IDirectFBFont *font = NULL;                     // Our font
> 
>       font_dsc.flags = DFDESC_HEIGHT;
>       font_dsc.height = 30;
>       DFBCHECK (dfb->CreateFont (dfb, "arial.ttf", &font_dsc, &font));
>       DFBCHECK (primary->SetFont (primary, font));
> 
>       *** do something with the font, ie, draw stuff on screen :) ***
> 
>       font->Release(font);
> 
> If you run this in a loop, the program will eventually fail to load the font, and 
>before it does, it will eat alot of memory.
> 
> Any comments are welcomed...

I didn't experience that yet, but I will do so now with small test app.

-- 
Best regards,
  Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

                            Convergence GmbH


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to