freetype-devel
[Top][All Lists]
Advanced

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

Re: [Devel] potential of memory leaking in kern


From: Werner LEMBERG
Subject: Re: [Devel] potential of memory leaking in kern
Date: Wed, 12 Nov 2003 16:14:15 +0100 (CET)

> So I guess code like following mab be used in FT_Done_Face:
> 
> if ( object->some_thing_field )
>    some_thing_field_free ( object->some_thing_field );

This is sufficient:

  some_thing_field_free( object->some_thing_field );

since FreeType's deallocator correctly handles the case where the
argument is NULL.

> > - in case of a font file with a broken kerning table, the engine
> >   _may_ allocate more memory than strictly needed in a FT_Face
> >   object
>
> I cannot free the allocated memory till FT_Done_Face is invoked if I
> obey the memory management rule you explained.

I don't fully understand.  Please elaborate.


   Werner



reply via email to

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