I've just set up a datastore using Datastore2 and started thinking about garbage collection. I thought "What happens if a server has been up for a LONG time? Wouldn't the game remember each in-game table for each individual player that has ever joined that specific server (assuming the server never goes down)?"
For example, the following code will retrieve the player's data (or set the default values of DefaultTable) and place the table inside playerData when the player joins the game:
local playerData = DataStore2(Key,plr):GetTable(DefaultTable())
Will this retain everyone's playerData (on that server) even after they leave?
Throughout the code I change values and "save" it to Datastore2. What happens when that player leaves? Is there a tether to that specific player's playerData that automatically sets it up for garbage collection as soon as the player leaves?
I apologize if this is something that isn't related to Datastore2, I just wanted to know if this is something I should take care of manually. Thank you.
