Memory corruption

I have a plugin written in C# that uses an embedded Julia. Most things work OK, but I get a problem caused by memory corruption from time to time. After rereading the chapter on Embedding I noticed that I could be causing problems to Julia’s GC because I was not using the jl_gc_wb function.

However, as far as I can see, that function is not currently being exported (in the DLL sense) and so it is not usable from C#'s Dllimport.

Is there a workaround?