[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] failed to compile ftvalid.c
From: |
Werner LEMBERG |
Subject: |
Re: [ft-devel] failed to compile ftvalid.c |
Date: |
Thu, 17 Nov 2005 10:04:39 +0100 (CET) |
> >In otvalid, documents say `free' should be used.
>
> I see. The usage of FT_ALLOC() and FT_FREE() is very same between
> otvalid and gxvalid. Yet I'm not sure the reason why free() should
> be used for tools using otvalid,
You should use free() in ftvalid.c because FT_FREE() is not a public
API.
> I suppose it is to make FreeType report the consumed memory for
> validation, by "memory leak" detection.
It's exactly the opposite. Only with FT_FREE() FreeType's internal
memory debugger works correctly (by setting the FT2_DEBUG_MEMORY
environment variable). If you use free(), you bypass the bookkeeping
routines.
Hmm, we have a problem. Replacing FT_FREE with free() in ftvalid.c
makes the following crash:
FT2_DEBUG_MEMORY=1 ftvalid <font>
David, what do you suggest? Maybe it's best to use plain ft_alloc()
and friends in FreeType for data which should be deallocated by the
user?
Werner
- Re: [ft-devel] failed to compile ftvalid.c, (continued)
- Re: [ft-devel] failed to compile ftvalid.c, mpsuzuki, 2005/11/17
- Re: [ft-devel] failed to compile ftvalid.c, Werner LEMBERG, 2005/11/17
- Re: [ft-devel] failed to compile ftvalid.c, mpsuzuki, 2005/11/17
- Re: [ft-devel] failed to compile ftvalid.c, mpsuzuki, 2005/11/17
- Re: [ft-devel] failed to compile ftvalid.c, Masatake YAMATO, 2005/11/18
- Re: [ft-devel] failed to compile ftvalid.c, Werner LEMBERG, 2005/11/18
- Re: [ft-devel] failed to compile ftvalid.c, Werner LEMBERG, 2005/11/18
- Re: [ft-devel] failed to compile ftvalid.c, mpsuzuki, 2005/11/18
Re: [ft-devel] failed to compile ftvalid.c, Masatake YAMATO, 2005/11/17
RE: [ft-devel] failed to compile ftvalid.c, Turner, David, 2005/11/17