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: Masatake YAMATO
Subject: Re: [Devel] potential of memory leaking in kern
Date: Wed, 12 Nov 2003 21:56:10 +0900 (JST)

> That's not true, it will be freed when the face will be closed, i.e.
> most likely when FT_Done_Face will be called. This technique is used
> very widely in the engine, it consists of:
> 
>   - using object destructors as the _only_ location where object fields
>     are released

I see.
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 );

> Your patch fixes the following issue though:
> 
>   - 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 see.

I think I've understood the both the memory management policy
in FreeType and the benefit of my patch. However, the memory 
management policy policy and the benefit are conflicted.


>   - 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.


Masatake YAMATO



reply via email to

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