# C struct garbage collection not run frequently enough

**URL:** <https://discourse.julialang.org/t/c-struct-garbage-collection-not-run-frequently-enough/116919>\
**Category:** General Usage\
**Tags:** garbage-collection, mutable-structure, c, gc\
**Created:** [July 11, 2024, 3:38pm UTC](https://discourse.julialang.org/t/c-struct-garbage-collection-not-run-frequently-enough/116919 "2024-07-11T15:38:28Z")\
**Posts on this page:** 1\
**Showing post:** 27

<div class="post-metadata">

**Author:** ![Sukera](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@Sukera](https://discourse.julialang.org/u/Sukera)\
**Post date:** [July 12, 2024, 7:03pm UTC](https://discourse.julialang.org/t/c-struct-garbage-collection-not-run-frequently-enough/116919/27 "2024-07-12T19:03:18Z")

</div>

For those keeping track: `unsafe_load` indeed ends up creating a copy of that mutable struct, which is very unfortunate 😕 The approach I outlined above doesn’t work.

---

_[View the full topic](https://discourse.julialang.org/t/c-struct-garbage-collection-not-run-frequently-enough/116919)._
