EQS Query eating up memory


Is there something in EQS that I’m supposed to clean up? I am running a query (from the pawn, not the BT) and with 4 bots I am watching the memory usage go up at about 10MB per second. Is it a leak I need to plug or is the GC just letting things accumulate? It has me worried.

I can run an alternative to the EQS and the memory usage is stable. I run the EQS only (not the code that uses the results) and the memory usage goes up. So it’s the EQS for sure. And I have a custom test but the problem still happens when I disable it in the query.

I saw another post (Memory leak when using EnvQuery copies - AI - Epic Developer Community Forums) but it wasn’t helpful.

I’m building the engine in debug so maybe I can figure out why its happening. I just figured maybe it was something I wasn’t doing, like cleaning up the query instance after the node that runs the query somehow.


I thought this was resolved because the memory usage caps out. See my comments below. While this isn’t a memory leak, it is an issue with GC (IMO).

I should say, tho. It’s not bad in the editor – caps out around 1.5GB. But my server eats up over 4GB before the GC kicks in and drops it down to ~200MB. It may not be getting handled efficiently.

Additional note: This is happening because I am running the EQS query from a Service. The Service runs four times per second. My query is pretty light so I thought it would be fine to do this. But the stutter I get from the GC clearing 4GB is a problem. It really should be reusing – or recycling or something – earlier than it is. I don’t suppose any Epic devs would look into this. Or, tell me why it will never work.