Unload libjulia when embedding


Is libjulia.dll intentionally blocked from unloading? I find I can call FreeLibrary immediately after loading, but once I call jl_init_with_image, the DLL can no longer be unloaded.

The issue I’m having is I load/process/unload within a C# thread. The second time around, I get an access violation, presumably because the DLL was never unloaded and is still hanging on to memory in the defunct thread’s stack.