# Memory leak in RuntimeManager.Update

**URL:** <https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493>\
**Category:** Unity\
**Created:** [February 25, 2020, 10:50pm UTC](https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493 "2020-02-25T22:50:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![BalancingMonkeyGames](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@BalancingMonkeyGames](https://qa.fmod.com/u/BalancingMonkeyGames)\
**Post date:** [February 25, 2020, 10:50pm UTC](https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493/1 "2020-02-25T22:50:26Z")

</div>

For ages I’ve noticed a few memory allocations every frame in RuntimeManager.Update and done nothing about it. I only just realised today that RuntimeManager is an FMOD class 🙂 Any idea what the allocations might be and how to remove them (if they can be removed)? I’m on 2.00.05 and the debug overlay is off. I’m asking because I’m trying to track down some memory leaks, so if these allocations are actually harmless let me know that too 😃

[image|341x190](https://qa.fmod.com/uploads/short-url/5vDIzHQOgxoj9Ruv3zbbhEDOgAx.png)

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [March 1, 2020, 11:46pm UTC](https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493/2 "2020-03-01T23:46:14Z")

</div>

The picture you linked is of the [CPU Usage Profiler](https://docs.unity3d.com/Manual/ProfilerCPU.html), which reflects the amount of time spent completing operations (in relation to each other).

---

<div class="post-metadata">

**Author:** ![BalancingMonkeyGames](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@BalancingMonkeyGames](https://qa.fmod.com/u/BalancingMonkeyGames)\
**Post date:** [March 2, 2020, 12:22am UTC](https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493/3 "2020-03-02T00:22:58Z")

</div>

The two pink blips are GC Allocs, which indicate memory dropping into the garbage. It happens _every frame_ in the RuntimeManager.Update. One is 20 bytes, the other is 112 bytes, if that helps

---

<div class="post-metadata">

**Author:** ![cameron-fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/cameron-fmod/32/261_2.png) [@cameron-fmod](https://qa.fmod.com/u/cameron-fmod)\
**Post date:** [March 4, 2020, 6:10am UTC](https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493/4 "2020-03-04T06:10:38Z")

</div>

As far as I can see it is to do with the `Settings.Instance.IsOverlayEnabled` call in update, which only occurs in the editor and not in a built game (which seems fairly harmless).

---

<div class="post-metadata">

**Author:** ![BalancingMonkeyGames](https://avatars.discourse-cdn.com/v4/letter/b/54ee81/32.png) [@BalancingMonkeyGames](https://qa.fmod.com/u/BalancingMonkeyGames)\
**Post date:** [March 4, 2020, 9:04am UTC](https://qa.fmod.com/t/memory-leak-in-runtimemanager-update/15493/5 "2020-03-04T09:04:19Z")

</div>

Excellent, that’d very good to know
