help-bash
[Top][All Lists]
Advanced

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

memory management of all_visible_functions return


From: Robert E. Griffith
Subject: memory management of all_visible_functions return
Date: Wed, 20 Apr 2022 13:28:53 -0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

I am calling all_visible_functions() in my loadable builtin. When I am done with the SHELL_VAR** it returns, should I xfree() it?

The reason I am asking is I followed the two places its called in the code and I don't see it being freed. They are pretty complicated so I could just be missing it but I thought I would ask. I believe that the returned variable is allocated in vlist_alloc() in variables.c.

And while I am asking, what is the concept of invisible variables and functions? Do they correspond to something we see in BASH scripts or is it an optimization detail?

Thanks,

--BobG





reply via email to

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