Is it hard to support Julia UDFs in DuckDB?

Thank you for all the work on Julia support on DuckDB, I use it heavily in my work.

Maybe this might help, instead of the global dictionary?

help?> GC.@preserve
  GC.@preserve x1 x2 ... xn expr

  Mark the objects x1, x2, ... as being in use during the evaluation of the expression expr. This is only required in unsafe code where expr implicitly uses memory or other resources owned by one of the xs.

See for example What am I doing wrong with `unsafe_wrap()`? - #2 by simeonschaub on how to use @preserve with unsafe_wrap. I imagine this use case should be similar?