I am currently working on creating a terrain save and loader so i can avoid the long loading times on my huge terrain world but i noticed the memory increases massively due to a memory leak i cant find and it never goes down.
What can i do to find the memory leak? I’ve already tried deep clearing the tables and all i could find was memorycategory_68 having 8.2GB worth of data but i cant see what the actual data is or where its origin came from to solve it.
I guess the best way to do so would be to monitor your table sizes in the script. You can see what script it is using the developer console in the memory section.
There is also something called “Watch” that can also help, though I don’t use it very much.
Interesting. I have heard that the script activity widget has broken recently but was fixed again. This could have very well possibly impacted the Watch widget. It might also be possible that it is because the script is running in parallel, but I cannot be sure.
Your first course of action should be to go back and disconnect any connections after the calculation is done and set any variables you no longer need to nil. See what effect that has on the memory usage after the calculations are complete and GC does its thing. Unfortunately, without breakpoints and watch it’s going to be extremely time consuming to find the direct cause. The debugging tools are extremely buggy when running code in parallel. Hopefully this gets fixed soon.