Can creating snapshots using memory Lua Heap increase server memory?

To test if i don’t have memory leaks ,i decided to connect and disconnect custom functions 1 milion times, it took 8 minutes, i made like 3 snapshots(Dev Console, ) and i saw that memory on server changed from about 300MB to 373MB, then i repeated experiment, but i found out that maybe only when i take snapshot memory increases

My question is, is this the case? or magically my script sometimes leave memory leak or not?
If snapshots do cause memory leaks themselves, then i can stop worrying about this

Why don’t you just check it few times
Also what’s snapshots

1 Like

In Lua Heaps there is such thing as snapshoot, it’s graph of all scripts/processes and objects in entire game

When you’re comparing snapshots, you should compare the individual fields with one another to see if memory goes up without ever going down. That would be more indicative of a memory leak than monitoring the amount of memory being taken up by the LuaHeap itself.

I wouldn’t use the actual amount of memory being taken up on the server as a number to gauge whether or not you have a memory leak over actually comparing the snapshots, as that can fluctuate for any number of reasons.

2 Likes

my question is, can making new snapshot create memory leak itself? because when i compared both snapshots and looked at memory usage, results were very good, but when i took snapshot without any scripts in game, memory leak happened