Download

Always leaking memory?

As I was busy stress-testing a project I am working on, I discovered a small memory leak. After some investigation it turned out that spawning actors and deleting them for some reason slowly leaks memory. At first I was using my own class derived from actor, and blamed that class. To make sure my class was to blame, I created a new empty class derived from Actor, and used that to see if the leak would not appear, but it did! (we are talking about spawning and deleting 1000s of objects per second).

Still thinking this must be some problem with my code, I opened a new project and made a blueprint actor which simply spawns 1000 actors of type actor per tick and removes them immediately. This still causes the memory to fill up and slowly grinds the game to a halt… what am i missing here?

Thanks!