[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] FT_Load_Glyph returns an error
From: |
Werner LEMBERG |
Subject: |
Re: [ft] FT_Load_Glyph returns an error |
Date: |
Sun, 13 Nov 2016 12:04:18 +0100 (CET) |
>> Please make your homework first:
>>
>> > ==1477== Rerun with --leak-check=full to see details of leaked
>> > memory
>>
>> If you try that you get more information that should help you identify
>> the problem.
>>
>
> Here is the result with --leak-check=full:
Well, yes, but you should also *read* and try to *understand* the
results. All `leaks' are related to `_dl_init', a function used to
manage dynamic libraries. This is *not* part of FreeType at all.
A bit of google search for `_dl_init' would have probably directed you
to
http://stackoverflow.com/questions/30376601/valgrind-memory-still-reachable-with-trivial-program-using-iostream
and other links which explain that `_dl_init' and friends are called
by the start-up code *before* `main' is executed. Consequently, the
allocated memory is deallocated after main.
An alternative to valgrind is to compile withh gcc or clang using
option `-fsanitize=leak'. I guess it won't show any leak in your
program.
Werner