freetype
[Top][All Lists]
Advanced

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

Re: [Freetype] Memory leak ?


From: David Turner
Subject: Re: [Freetype] Memory leak ?
Date: Fri, 07 Dec 2001 01:20:04 +0100

Hello Nir,

Nir Rostoker a écrit :
> 
> Hi !
> While trying using FreeType2, I have noticed that there might be a memory
> leak. When I tried to render a string, going char by char, I have noticed
> that even though the string contained the same chars (for example "hhhh"),
> the memory on my heap had increased on each iteration of loading and
> rendering.
> 
> Are you aware of memory leaks on FreeType2 ?
>

We're not aware of any memory leak in FreeType 2. However, the current
CVS sources (not 2.0.5 or previous versions) include a debug memory manager
that can be used to detect leaks relatively easily..

You need to define FT_DEBUG_MEMORY in "ftoption.h" (see the comment in
this file related to this macro), recompile the library and re-link your
executables..

Now, when you define the "FT_DEBUG_MEMORY" environment variable before
running any of your programs using FreeType, the engine will use special
code to track all memory allocations.

And when FT_Done_FreeType will be called, a summary of total memory
footprint and eventual leaks will be displayed.. Try it, it's really
nice to find memory leaks :-)

Regards,

- David



reply via email to

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