Locating memory leaks?

Generally, memory leaks are caused by leftover code that doesn’t get picked up by the garbage collector and it gets left in the memory. You should check throughout your code to optimize it and disconnect any connections you don’t need or use the :Destroy() method to properly remove the object from memory if you don’t need it.

I’m by no means an expert on this type of stuff, but there is a wonderful tutorial that explains in-depth what could cause some of your leaks.

https://devforum.roblox.com/t/psa-connections-can-memory-leak-instances/90082

12 Likes