# Delete arrays or free the memory allocated to them

**URL:** <https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035>\
**Category:** General Discussion\
**Created:** [October 3, 2022, 1:59pm UTC](https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035 "2022-10-03T13:59:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![miguelpicos](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Post date:** [October 3, 2022, 1:59pm UTC](https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035/1 "2022-10-03T13:59:57Z")

</div>

is there some funtionality like delete in C? I am working with auxiliar arrays that once I use them i would like to free the memory allocated to them. Is there any way of doing this?

Thank you,

---

<div class="post-metadata">

**Author:** ![aszaboa](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.freefem.org/aszaboa/32/2918_2.png) [@aszaboa](https://community.freefem.org/u/aszaboa)\
**Post date:** [October 4, 2022, 5:33am UTC](https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035/2 "2022-10-04T05:33:28Z")

</div>

I think you can just scope (put the operations between `{}` symbols) the corresponding code, and the variables defined within `{}` will be discarded.

---

<div class="post-metadata">

**Author:** ![miguelpicos](https://avatars.discourse-cdn.com/v4/letter/m/8797f3/32.png) [@miguelpicos](https://community.freefem.org/u/miguelpicos)\
**Post date:** [October 4, 2022, 6:02am UTC](https://community.freefem.org/t/delete-arrays-or-free-the-memory-allocated-to-them/2035/3 "2022-10-04T06:02:03Z")

</div>

That should work, thank you.
