# Memory corruption

**URL:** https://discourse.julialang.org/t/memory-corruption/63129
**Category:** General Usage
**Tags:** garbage-collection
**Created:** [June 18, 2021, 8:00am UTC](https://discourse.julialang.org/t/memory-corruption/63129 "2021-06-18T08:00:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![aml](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/aml/32/202471_2.png) [@aml](https://discourse.julialang.org/u/aml)
#### Post date: [June 18, 2021, 8:00am UTC](https://discourse.julialang.org/t/memory-corruption/63129/1 "2021-06-18T08:00:40Z")

</div>

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?
