# Anonymous function's type and methods last forever?

**URL:** https://discourse.julialang.org/t/anonymous-functions-type-and-methods-last-forever/116676
**Category:** Internals & Design
**Created:** [July 5, 2024, 6:19pm UTC](https://discourse.julialang.org/t/anonymous-functions-type-and-methods-last-forever/116676 "2024-07-05T18:19:56Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![nsajko](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nsajko/32/221187_2.png) [@nsajko](https://discourse.julialang.org/u/nsajko)
#### Post date: [July 5, 2024, 7:35pm UTC](https://discourse.julialang.org/t/anonymous-functions-type-and-methods-last-forever/116676/6 "2024-07-05T19:35:58Z")

</div>

Discussed recently:

> [@How's the progress in garbage-collecting unused functions?](https://discourse.julialang.org/t/hows-the-progress-in-garbage-collecting-unused-functions/116300):
>
> When a function compilation in Julia no longer gets used, it doesn’t go away. Instead, it stays in memory. Normally, this is not a problem because you don’t generate so many functions in the first place, and each function doesn’t take much memory. However, in my (private) symbolic regression use case, I generated a lot of functions and learned the painful way that unused generated functions stay in memory. This poses a serious issue in semi-dynamic programs where codes are generated and compiled…

---

_[View the full topic](https://discourse.julialang.org/t/anonymous-functions-type-and-methods-last-forever/116676)._
