Re: [dev] [libsl][bug] Call FcFini on cleanup for projects calling FcIni

From: Anskrevy <zergrusherncrusher_AT_disroot.org>
Date: Fri, 28 Oct 2022 08:36:15 -0700

On 10/28/22 01:20, Hiltjo Posthuma wrote:
> On Thu, Oct 27, 2022 at 01:19:28PM -0700, Anskrevy wrote:
>> Any program using libsl, or calling FcIni (directly or indirectly), that
>> does not call FcFini results in a small memory leak. dwm and dmenu are
>> effected by this. Appending a call to FcFini in the cleanup function will
>> fix this.
>>
>
> Wouldn't it just free the memory on program exit by the operating system?
>
> In this case I don't see the issue becaus it doesn't memory leak over time.
>
> Let me know if I missed something,
>
You are correct.

I was trying to find the leak in a program I am developing and found
that this call resolved it. For those newer who use other suckless
programs as reference when writing their own it might be nice to have a
note about this function. Mention of it in the comment above
drw_fontset_create would be my suggestion.
Received on Fri Oct 28 2022 - 17:36:15 CEST

This archive was generated by hypermail 2.3.0 : Fri Oct 28 2022 - 17:48:08 CEST