I have been having memory leak issues with UE4 since Ive been using it. Which was around Nov. of 2015, version 4.10 I believe. I always thought it was my computer, which it still might be. /shrug
Anyways, when using the editor for blueprint scripting, opening and closing blueprints, raise the memory use of the editor. I know this by using windows task manager and looking at the process tab. The memory use only goes up. After closing blueprints in the editor the memory doesn’t drop. Once it goes up it doesn’t go back down.
When opening my player character BP along with one of my AI characters BP the initial use of memory goes up. Should I close both of those the memory doesn’t drop. But should I reopen them, the memory does go up but not nearly as much.
So If on start up of the editor the memory use of UE4 editor is at around 2 gigs. If I open 1 blueprint (BP), the memory use goes to around 2.1 gigs. On the second BP the memory use goes up to around 2.2 gigs. If I close both BPs the memory doesn’t drop. It stays at 2.2 gigs. Should I reopen 1 BP again the memory might creep up to 2.22 gigs. On the 2nd BP, memory use may bump to 2.24 gigs. Again on closing those the second time, the memory use of UE4 doesn’t decrease.
This gets even worse when I play my level in a new editor window (see Note below on mobile preview, and standalone game), PIE. Upon playing the level in PIE the memory use of UE4 jumps up, the longer I play in PIE, the higher the memory goes. Once I close down PIE the memory use stays where it is. So if on the first time playing my level in PIE, lets say the memory use jumps to 3 gigs. After playing a few minutes the memory might be around 4 gigs.
After PIE has closed the memory stays pretty much where it was when it closed. Unless I open and close blueprints etc. On a second launch of PIE, the memory jumps up again, creeps up during play, stays about where it was when I closed the second instance of PIE.
So, on first use of PIE, memory use goes to 3gs, play for a few mins, close it, memory might be near 4gs. Stays at 4gs or so. Go into PIE a second time, memory jumps to 5gs, play a few mins memory use might be around 7gs at closing and stays there till I open a third PIE and so on…
After doing this several times, eventually my RAM is at its max (16gs). At this point my computer is pretty much at a stand still. I close UE4, if I can, and eventually the process for UE4 will turn off. This can take several minutes. Usually I’m to impatient to wait so I go into task manager and stop the process manually. Which still can take a few moments to clear out of memory.
Now after my long text of explanation, I hope you get the idea.
Is this issue something I can rectify on my computer, could it be something in my games BP logic that stays in memory, or could this be an editor bug?
Thanks for your time!
~
NOTE:
When playing my level using either mobile preview or the standalone game modes memory use of UE4 editor does not rise (well it does creep ever so slow, but I think that’s due to having BPs open, or maybe even just clicking on and off the edit window.). Either of these modes use about 1.3gs worth of memory. The memory goes up to that point, stays there during playing of the level, then on closing of these modes, the memory use for these processes goes away. Since they are closed.
The memory use for UE4 editor window stays pretty much where it is during these modes. But opening and closing of BPs still effect UE4 editor process memory use which is seperate from these other 2 mode processes.