# Server memory leak in 2.02.03 UE 4.26 integration

**URL:** <https://qa.fmod.com/t/server-memory-leak-in-2-02-03-ue-4-26-integration/18321>\
**Category:** Unreal Engine\
**Tags:** ue4\
**Created:** [February 3, 2022, 7:03pm UTC](https://qa.fmod.com/t/server-memory-leak-in-2-02-03-ue-4-26-integration/18321 "2022-02-03T19:03:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dstanfill](https://avatars.discourse-cdn.com/v4/letter/d/8edcca/32.png) [@dstanfill](https://qa.fmod.com/u/dstanfill)\
**Post date:** [February 3, 2022, 7:03pm UTC](https://qa.fmod.com/t/server-memory-leak-in-2-02-03-ue-4-26-integration/18321/1 "2022-02-03T19:03:12Z")

</div>

Hi,

We have been investigating memory leaks on dedicated server, and found a small leak in `UFMODBlueprintStatics::PlayEventAttached`. On dedicated server, it results in a new `UFMODAudioComponent` being created for each call, many of which are never cleaned up since the sounds do not actually play. On our side we are adding this to the top of the function:

```auto
	if (!FApp::CanEverRenderAudio())
	{
		return nullptr;
	}

```

I’m curious to see if there is any feedback on this fix and whether another fix would be more appropriate.

Note that we found this with 2.02.03 on 4.26, but the same bug appears to be there on 2.02.05 on 4.27.

Thanks,  
Dan

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [February 7, 2022, 4:42am UTC](https://qa.fmod.com/t/server-memory-leak-in-2-02-03-ue-4-26-integration/18321/2 "2022-02-07T04:42:43Z")

</div>

Thank you for flagging, I have passed this along to the Dev team to fix up in a future release.  
I think your solution makes sense, we return nullptr in a few other cases and that doesn’t seem to be causing issues in those situations. Maybe this would be a little more semantically tied to the FMOD API:

```auto
if(!IFMODStudioModule::Get().UseSound())
{
    return nullptr;
}

```
