In the scenario of a running server of five players within the studio instance described above, one player leaves the game and four remain. As per the script states above they would all have CharacterAdded connected to their player whenever they join, but when that one player leaves, is that player’s CharacterAdded function still connected to their player even though its nil? If it is, is that what a memory leak is?
Memory leaks are frequently mentioned in memory management.
References in a script should be considered to be controlled, because the more references that becomes ‘hanging’ in the code, the less free memory there are due to their operations occupying the memory for no real purpose.
Don’t worry about the player.CharacterAdded connection, it is GC’d(garbage collected) when the player instance has left; been destroyed.