# Way to reclaim recently unassigned variable?

**URL:** <https://discourse.julialang.org/t/way-to-reclaim-recently-unassigned-variable/25385>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 18, 2019, 4:51am UTC](https://discourse.julialang.org/t/way-to-reclaim-recently-unassigned-variable/25385 "2019-06-18T04:51:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![djsegal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/djsegal/32/13752_2.png) [@djsegal](https://discourse.julialang.org/u/djsegal)\
**Post date:** [June 18, 2019, 4:51am UTC](https://discourse.julialang.org/t/way-to-reclaim-recently-unassigned-variable/25385/1 "2019-06-18T04:51:50Z")

</div>

Let’s say you’ve created some data object:

```julia
cur_dict = Dict()
for i in 1:10000
  cur_dict[i+rand()] = i
  sleep(2)
end

```

Then you fat finger the previous code again so that `cur_dict` is reset to `Dict()`.

Is there a way to reclaim the `cur_dict` – that got over-referenced – before it gets garbage collected?

---

<div class="post-metadata">

**Author:** ![c42f](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c42f/32/52842_2.png) [@c42f](https://discourse.julialang.org/u/c42f)\
**Post date:** [June 18, 2019, 5:21am UTC](https://discourse.julialang.org/t/way-to-reclaim-recently-unassigned-variable/25385/2 "2019-06-18T05:21:55Z")

</div>

There’s no way to do this unless you have another name for the same data structure. (At least no way I know of, other than inspection of some _very_ internal GC data structures.)
