Memory Leak or ??? On Mac

Can’t see a place to post a question like this.

I was noticing my RAM getting used up while running our game, and it wasn’t released after terminating PIE. I decided to leave the game running over night and found it was seemingly leaking 2 gb per hour. I managed to use all available 64GB of RAM. I assumed my use of Hard Pointers was catching up with me, but decided to test a non-C++ default game. I started with a 5.1.1 copy of the vehicle tutorial game and let it sit running in PIE. It appeared to leak at a lower rate but still took up an extra Gig in 3 hours and was still climbing when I killed it. In the same manner as our game, the memory wasn’t released just by killing the PIE session. Only restarting the game would return it to its lower usage.

This is on a Intel MacPro and in using memreport, it appeared the only obvious large growth of memory is in Metal RHI Buffers. I would doubt this is happening on Windows or someone would have mentioned it.

I guess the question is, is it expected that a default project in PIE will grow over hours (possibly collapsing that memory usage at some later point). I need to determine if I’m doing something wrong, which as an old C programmer, I’ve alway felt my use of regular pointers to UObjects might be a suspect practice. But then seeing what seemed to be the same situation on a default stock project, confused the issue and now I’m not sure if I should do something or just file a bug report. The last thing in the world I want to do is cry wolf about a memory leak. Any other Mac Users see this happening?

Hey there @eagletree! I’ve been seeing some very sparse reports of both RAM and dedicated GPU mem spiking and not being collected. However this is the first I’ve seen from a MacOS user. Being unable to replicate all of the instances of Windows users encountering either variant, for windows I believe it’s environmental. I can’t speak at all to MacOS. The MacPro comes with an M1 right?

Not an M1. The MacPros we are using are the 2019 variant with Intel Xeon.

What I’m observing is pretty easy to recreate. I open a new vehicle project in 5.1.1. Open an activity monitor, selecting Mem as the sort. Press Play on project. Switch to Act Mon and note RAM usage. Click back into running game. Wait an hour (or whatever) and click back to Act Mon, noting usage and threads. If like mine, usage will have increased by a gig and the thread count gone up. Then killing the PIE session will not return the memory until the 5.1.1 editor is closed and restarted. I did this, only measured for 3 hours. On our actual game, I measured it over a 12 hour period.

If there is another Mac user who would like to try this, it would be interesting to see if they get different results.

Here is my config:

Screen Shot 2023-03-09 at 07.47.32

Excellent data! Here’s hoping we can get more from other MacOS users. I’ll be directing anyone else I find with similar issues this way to see if we can get some more input.