[Top][All Lists]

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

Re: [ft-devel] controlling FreeType modules

From: Miles Bader
Subject: Re: [ft-devel] controlling FreeType modules
Date: Wed, 22 Aug 2012 16:06:15 +0900

Werner LEMBERG <address@hidden> writes:
>> What are the void* pointers typically expected to point to...?
> Property data structures.
>> As I suppose these void* values are often pointers to some malloced
>> memory in many cases, how is it expected that resource management of
>> that memory is done...?  I.e., when the a list gets destroyed
>> because a FT library is destroyed, who's responsible for cleaning up
>> the pointed-to property data?
> FreeType.  If there is ever a need to pass a new string to the library
> (for which I currently don't have a use case), the data will be
> copied.

Wait .... how does that work?

That suggests that freetype will copy any structure passed in into
malloced memory or something; otherwise, one couldn't pass in any
dynamically calculated values.

But since (AFAICT) the property mechanism is generic, the type of the
data structure wouldn't be known except to the eventual caller of
FT_Property_Get.  Given this, how can FT_Property_Set know the size of
the data structure passed in, to malloc/copy it?



Love is the difficult realization that something other than oneself is real.
[Iris Murdoch]

reply via email to

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