Framerate and memory usage climbing

I’m having an issue where the frame framerate and memory display keeps showing the memory usage and objs climbing rapidly every time I generate a new seed.

for a little context I’m making a procedural dungeon generation system that is driven off of a random stream variable. I have it set up that all I have to do in the editor is check a bool variable to true and it will automatically generate a new seed, clear all of the data from the previous seed and generate new data based on that new seed (random stream) and uncheck the bool for make a new seed. the problem I’m seeing is that every time I generate a new seed value the memory usage and obj’s climb higher and higher every time. I’ve even deleted the generator from the scene and those numbers don’t drop at all. I’m not sure if this is a bug in the framerate and memory display or if ive done something wrong in the blueprint itself.


Can you show how the actors are added / removed?

at the moment I’m just clearing all of the arrays that hold the information for the tiles to spawn. After reading this question though I’m guessing that even though the old ones aren’t being spawned in the fact that they had been in the past means that they still have data being stored somewhere. is there a way that I can unload that data from the blueprints?

just incase my answer isn’t clear ill elaborate a bit.
so I’ve made a custom struct variable that I use to store all of the specific information of each individual room and then after all of that data has been calculated i save it to an array. from there I take each of those pieces of information and calculate what tiles to spawn and where they go. When I generate a new seed the very first thing the blueprint does is to clear out all of the arrays that the blueprint uses before calculating the new information.

outside of that I don’t do anything extra to clear out old data so I’m guessing that there is some old data from the previous spawning that is still in the background eating up the memory, but I don’t know how to go about clearing that out. any tips on how to do that in blueprints?

also thanks for the reply. this issue isn’t causing any crashes or anything so its not urgent by any means.

so after a little playing around I managed to find the “clear instances” node this seemed to help a tiny bit, but didn’t seem to solve the issue entirely. I’ve had a hard time finding good documentation on these readouts and what it is they are actually checking. i did figure out that having blueprint editor open means this readout is counting each node as an object, when that window is closed it reads less objs and lower memory usage. so this seems to be more focused on what all the editor is utilizing and less about how the game itself will run. I also noticed that when i save all, the obj count and memory usage drops back down. so after all that I’m thinking that I probably misunderstood what these readouts are actually supposed to be used for. can anyone provide an explanation for what the use case(s) of this readout would be?

Is it in c++? Do you use uobject as a parent class anywhere? Remember that it doesn’t have a nornal life cycle but requires cleanup in it’s destructor

Any spawned actor via newObject has to be cleared up manually too. The garbage collector won’t catch it.

everything is being done in blueprint. everything that is being spawned is an instance static mesh.