[Top][All Lists]

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

Re: Memory leak

From: YAMAMOTO Mitsuharu
Subject: Re: Memory leak
Date: Mon, 19 May 2008 20:59:26 +0900
User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (Maruoka) FLIM/1.14.8 (Shijō) APEL/10.6 Emacs/23.0.50 (sparc-sun-solaris2.8) MULE/5.0 (SAKAKI)

>>>>> On Mon, 19 May 2008 20:13:15 +0900, Kenichi Handa <address@hidden> said:

>> It seems like the `free_entity' entry in `struct font_driver' no
>> longer makes sense because you tried to remove the memory leaks by
>> avoiding Lisp_Save_Value in font entities instead of calling
>> free_entity at some proper timings.  Is that right?

> Not exactly.  When I deleted ftfont_free_entity, it was in my mind
> to change also ftfont_list to avoid using Lisp_Save_Value, but I
> just forgot to implement that change.

> The free_entity callback is still called in font_clear_cache if a
> font-driver provides that function.

So, `free_entity' is supposed to be still valid.  Then I think
the entities deleted in `font_delete_unmatched' need to be freed
as they are not kept in the cache.

Also, there are some suspected leaks in font-related code:

 * `names' in xfont_list_pattern.
 * `charset' in ftfont_spec_pattern when it is created from

                                     YAMAMOTO Mitsuharu

reply via email to

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