Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Is this segment a memory leak?

Asked by 6 years ago
Edited 6 years ago

Lets say i have

 t = {Player1}  -- Assume player1 is a Player

then Player1 leaves the game

would t still have a reference to player1? and thus have a memory leak if i don't set its value to nil?

1 answer

Log in to vote
0
Answered by
ozzyDrive 670 Moderation Voter
6 years ago

Yes, you still have a reference to the player object. It won't be garbage collected until you lose the reference.

Ad

Answer this question