# Dask Distribtued Variables Clean Up

**URL:** https://dask.discourse.group/t/dask-distribtued-variables-clean-up/1865
**Category:** Distributed
**Tags:** distributed
**Created:** [May 17, 2023, 2:22pm UTC](https://dask.discourse.group/t/dask-distribtued-variables-clean-up/1865 "2023-05-17T14:22:28Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Niphemy](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/niphemy/32/816_2.png) [@Niphemy](https://dask.discourse.group/u/Niphemy)
#### Post date: [May 17, 2023, 2:22pm UTC](https://dask.discourse.group/t/dask-distribtued-variables-clean-up/1865/1 "2023-05-17T14:22:28Z")

</div>

Hey everyone,

I have a setup in which I assign a unique `Variable()` to each job submitted to the Dask cluster using `fire_and_forget()`. This variable serves as a stopping condition and can be set elsewhere in the code.

Now, here’s my concern: If, let’s say, 100 of these jobs have finished running, would I end up with 100 “leaked” memory allocations to Dask variables? In other words, I’m wondering how these variables get cleaned up. Do I need to manually delete them once they are no longer needed?

I would greatly appreciate any insights or suggestions regarding this matter.

Thanks in advance!

---

<div class="post-metadata">

### Author: ![guillaumeeb](https://yyz1.discourse-cdn.com/flex035/user_avatar/dask.discourse.group/guillaumeeb/32/1613_2.png) [@guillaumeeb](https://dask.discourse.group/u/guillaumeeb)
#### Post date: [May 18, 2023, 12:14pm UTC](https://dask.discourse.group/t/dask-distribtued-variables-clean-up/1865/2 "2023-05-18T12:14:17Z")

</div>

Hi @Niphemy,

> [@Niphemy](#):
>
> Do I need to manually delete them once they are no longer needed?

Yes, I think so! You should call the `delete` function on Variable you don’t need anymore.
