freetype
[Top][All Lists]
Advanced

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

Re: [ft] bug in ftbench.c ?


From: David Turner
Subject: Re: [ft] bug in ftbench.c ?
Date: Thu, 01 Jun 2006 11:13:19 +0200
User-agent: Thunderbird 1.5 (Windows/20051201)

Hello,

luoyi a écrit :
In ftbench.c:

  if ( cache_man )
    FTC_Manager_Done( cache_man );


  FT_Done_Face( face );

  FT_Done_FreeType( lib );


should this be:

  if ( cache_man )
    FTC_Manager_Done( cache_man );
  else
    FT_Done_Face( face );

  FT_Done_FreeType( lib );

No, it shouldn't. When you call FTC_Manager_Done, this destroys all FT_Face
objects that were created by the cache manager itself, i.e. the ones you can retrieve
through FTC_Manager_LookupFace or FTC_Manager_LookupSize.

This doesn't affect other FT_Face objects created by the user. And the 'face'
variable in ftbench.c is created through a direct call to FT_New_Face
(or FT_New_Memory_Face), so it must be destroyed explicitely.

On the other hand, FT_Done_FreeType(lib) does destroy all FT_Face objects
associated to the library instance, (which is why you must always call FTC_Manager_Done
before FT_Done_FreeType)

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)

??????????????????????????????????????????????




_______________________________________________
Freetype mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/freetype



***********************************************************************************
Information contained in this email message is confidential and may be 
privileged, and is intended only for use of the individual or entity named 
above. If the reader of this message is not the intended recipient, or the 
employee or agent responsible to deliver it to the intended recipient, you are 
hereby notified that any dissemination, distribution or copying of this 
communication is strictly prohibited. If you have received this communication 
in error, please immediately notify the address@hidden and destroy the original 
message.
***********************************************************************************




reply via email to

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