When embedding, do jl_array_t*, jl_sym_t* and jl_value_t*-representing-a-type need to be wrapped in RefValue{Any} when rooting?

From https://docs.julialang.org/en/v1/manual/embedding/, it seems if I want a long-lasting object not to be collected by the Julia garbage collector when embedding Julia in C++, I need to store that object in an IdDict bound to a global Julia variable. If the object is immutable, then I can’t just store it directly, I need to wrap it in a RefValue{Any}. My question is:

  1. Does a jl_array_t* created by jl_ptr_to_array_1d also need to be wrapped in a RefValue{Any} when the element type is immutable?
  2. Does a jl_sym_t* need to be wrapped in a RefValue{Any}?
  3. Does a jl_value_t* that points to a type (e.g. jl_eval_string(“MyType”)) need to be wrapped in a RefValue{Any}?

As mensioned in the document, this only apply to immutable types and you can answer this yourself,

julia> isimmutable([1, 2])

julia> isimmutable(:a)

julia> struct MyType

julia> isimmutable(MyType)

Thanks for explaining!