I have been having what I assume a memory issue, roblox would crash but I thought nothing of it until I recently looked at my memory usage. Just a simple place alone with 1 or 2 scripts skyrocket my memory usage, most I seen was a few gigs. So, I tried to google what this was, and everything just said to close functions you will use or close (disconnect() or delete) functions you will never use again, well, just a few minutes ago, opened a BRAND NEW BASEPLATE, and it says 713 mb of memory is being used, a whopping 509 and climbing is UNTRACKED, but this is a new baseplate! What could be the issue?
Also, what is collectgarbage()? I learned how to count my garbage with it, is it bad to use? why does an empty NEW game have GARBAGE(it counted 66.265625)>what’s that number even mean? My place with just meshes, and parts (no scripts) has the exact same amount! I have no idea how to find “untracked” memory.
What does everyone do when they have an ungodly amount of untracked data that comes from what seems like nowhere?
I am very sorry if this is the wrong place to ask this, please guide me to where I should ask this, I hope this post helps anyone else with this issue. Thanks to any kind soul willing to guide me.
collectgarbage
gives you options to manage the garbage collector. However, in Roblox, you can only count how much memory is being used and unfortunately not start a manual garbage collection which frees (lets other processes use the memory) memory no longer in use, which is called garbage (or at least I think) is because its just sitting around and wasting memory. What you get from using the collect option is the total amount of memory used in Kbytes (what the Lua docs say, it could be a kilobyte or a kibibyte) and 66 kb used isn't a lot.
I think that, since how memory is categorized in Roblox isn't related to you programming in Lua, you should ask in our Discord server instead of the site.