# Proposal for deterministic memory management

**URL:** <https://discourse.julialang.org/t/proposal-for-deterministic-memory-management/39305>\
**Category:** Internals & Design\
**Created:** [May 10, 2020, 7:36am UTC](https://discourse.julialang.org/t/proposal-for-deterministic-memory-management/39305 "2020-05-10T07:36:34Z")\
**Posts on this page:** 1\
**Showing post:** 34

<div class="post-metadata">

**Author:** ![Amin\_Yahyaabadi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/amin_yahyaabadi/32/9826_2.png) [@Amin\_Yahyaabadi](https://discourse.julialang.org/u/Amin_Yahyaabadi)\
**Post date:** [May 12, 2020, 9:04am UTC](https://discourse.julialang.org/t/proposal-for-deterministic-memory-management/39305/34 "2020-05-12T09:04:53Z")

</div>

We can do this in a backward-compatible manner. By **only managing the memory for the variables** that are defined using `Var{:scope}()` for named scopes and `Var()` for local scopes.

We can easily set limitations for the developers then. They should not call `@eval` in a scope that uses `Var` (we can return an error), they should manage global variables manually, and **any other situation** that we think we cannot handle automatically.

By setting these limitations I cannot think of any code that breaks. Either someone wants automatic memory management and follows the limitations or they should use GC.

---

_[View the full topic](https://discourse.julialang.org/t/proposal-for-deterministic-memory-management/39305)._
