# Reset all julia data from C

**URL:** <https://discourse.julialang.org/t/reset-all-julia-data-from-c/22833>\
**Category:** General Usage\
**Created:** [April 6, 2019, 9:19am UTC](https://discourse.julialang.org/t/reset-all-julia-data-from-c/22833 "2019-04-06T09:19:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kim366](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kim366/32/5756_2.png) [@kim366](https://discourse.julialang.org/u/kim366)\
**Post date:** [April 6, 2019, 9:19am UTC](https://discourse.julialang.org/t/reset-all-julia-data-from-c/22833/1 "2019-04-06T09:19:09Z")

</div>

I thought that `jl_atexit_hook` cleared all of julia data, but when I do something along the lines of

```nohighlight
jl_init();
jl_eval_str("x = 5");
jl_atexit_hook(0);

jl_init();
jl_unbox_int64(jl_eval_str("x"));
jl_atexit_hook(0);

```

When I unbox the `x`, it still has the value 5. I want this code to behave as if the first init/atexit\_hook code was never run. What’s the right function to do that?
