How do I detect memory leaks?

How do I detect memory leaks? or what scripts are causing it?

There’s not really a way to “detect” a memory leak per say. They are definitely noticeable over time as the game will lag with the consumption of so much memory. However, as long as you follow good practice, disconnect events that don’t have a purpose, and destroying/deleting any reference to something that you don’t need. Following this, memory leaks shouldn’t happen. One way to technically “detect” if there’s a memory leak is if the client memory continually rises. However, this method is not reliable as memory usage fluctuates.

8 Likes

Here is an article, that has section devoted to finding possible memory leaks.

5 Likes

Instead of guessing and checking for memory leaks and wasting your time, just take a peek in the F9 console. Adding on to this old thread because it was on the Google results page and leads to a complicated community document that doesn’t offer much help with locating and detecting them.

1 Like