# Garbage collection from C / Storing jl\_value\_t \* in global C variables

**URL:** <https://discourse.julialang.org/t/garbage-collection-from-c-storing-jl-value-t-in-global-c-variables/3056>\
**Category:** General Usage\
**Tags:** embedding\
**Created:** [April 5, 2017, 9:45am UTC](https://discourse.julialang.org/t/garbage-collection-from-c-storing-jl-value-t-in-global-c-variables/3056 "2017-04-05T09:45:48Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![yuyichao](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/yuyichao/32/20_2.png) [@yuyichao](https://discourse.julialang.org/u/yuyichao)\
**Post date:** [April 5, 2017, 5:40pm UTC](https://discourse.julialang.org/t/garbage-collection-from-c-storing-jl-value-t-in-global-c-variables/3056/6 "2017-04-05T17:40:15Z")

</div>

Ref [Libjulia / c-api : how to unbox SparseMatrixCSC](https://discourse.julialang.org/t/libjulia-c-api-how-to-unbox-sparsematrixcsc/2620)  
[Redirecting to Google Groups](https://groups.google.com/forum/#!searchin/julia-users/%2420Julia%2420embedding%2420--%2420Create%2420Dict%2420variable%2420from%2420C%7Csort:relevance/julia-users/E4FNM7m_Alw/3AL1bcJmAgAJ)

There isn’t and won’t be one since it’s defined in julia and there’s no standard C api for it.  
Define your own in julia (or use `getindex`/`setindex` etc) and access it with `cfunction or jlcall*`.

---

_[View the full topic](https://discourse.julialang.org/t/garbage-collection-from-c-storing-jl-value-t-in-global-c-variables/3056)._
