Do you need to root modules, functions and symbols?

I have noticed that jl_sym_t values do not seem to be rooted anywhere in the source and just live for the duration of the program. I would suspect the same is true for functions and modules, is this correct? If so, is this also true for anonymous functions that are returned by functions? Or do I need to root every type of value?

Thanks, happy Easter :slight_smile:

That is not true. Symbols are one of the only objects you can safely assume are permanently allocated. This is also true of some types (the results of typeof) and therefore most Modules. It is false of Functions.

Very interesting. Thanks for the quick reply!