Trying to understand memory leaks here

Garbage Collection and Memory Leaks in Roblox - What you should know - Resources / Community Tutorials - Developer Forum | Roblox

Try reading this.

TL;DR: Luau does garbage collection. Automatically. It depends on a few things, like scope, and whether or not a thread is alive.

  • Things like wait() will prevent a threat from terminating until the thread finishes waiting.
  • Scope is important: exiting a level of scope will mean that garbage collection can occur to memory in that scope.

Unreadable memory is (to my knowledge) impossible.

1 Like