freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] do I have to release the memory explicitly?


From: David Turner
Subject: Re: [Freetype] do I have to release the memory explicitly?
Date: Fri, 16 May 2003 12:38:19 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312

陈亮 wrote:
> Hello,everyone
>       I use the function FT_Load_Char in a loop,and do something with the 
> face->glyph->outline data member.Do I have to release the memory hold by 
> face->glyph explicitly?Or the freetype system will manage the memory 
> automatically when I load the next char?
>       
Everything that is accessible from a FT_Face handle belongs to the object 
itself and
will be destroyed when FT_Done_Face is called. Each time you call FT_Load_Glyph,
the glyph data in face->glyph is re-written.

If you want to "extract" glyphs outside of the FT_Face, you should use something
like FT_Get_Glyph. The new FT_Glyph object is owned by you, and must be 
destroyed
by calling FT_Done_Glyph explicitely.

Finally, everything that comes from the cache is owned by it.

Hope this helps,

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


--
This message and any attachments (the "message") is intended solely for the
addressees and is confidential. If you receive this message in error, please
delete it and immediately notify the sender.
Any use not in accordance with its purpose, any dissemination or disclosure,
either whole or partial, is prohibited except formal approval.
The E-Mail transmission can not guarantee the integrity of this message.
CANAL+TECHNOLOGIES will not therefore be liable for the message if modified.





reply via email to

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