I'm no expert in these memory managment things. I believe JustSid has a lot of knowledge in this area. Maybe he can add his opinion here?

However, I don't think that memory leak theory is very plausible. If you have a look at the ENTITY struct in atypes.h there is no hint that the amount of memory required is not statically known. Additionally not knowing the exact size of a data structure at compile time is a pretty bad excuse for memory leaks.

The "mem" column should be the amount of virtual memory allocated. You can have a closer look at the meaning of the columns here: http://www.conitec.net/beta/aAnhangC_Tasten.htm

Last but not least:
Originally Posted By: Carlos3DGS
The test has been running for around 2 hours now so over 1,224,000,000 entities have been created and removed withought any changes to the memory MB column.

This is pretty much the prove that even if such an ominous bug exists you're completely safe to ignore it. You won't have such difficult conditions like you created in your test in your game as well, would you? However, keep in mind that your solution with making entities invisible and storing them for later usage will most likely outperform the aproach of always using ent_create and ptr_remove because ent_create is a bit slow. I'd suggest using the ent_create and ptr_remove solution beacuse it is easier to implement, check the performance and if there is any bottleneck switch to your solution with "caching" used entities instead of removing them.


Always learn from history, to be sure you make the same mistakes again...