Using instances as keys in a table

I recommend you look into the nature of weak tables, which have the unique property of removing references by choice of their key, value, or either being nil.
Answering your question, your dictionary was set up on default to contain strong keys and values, as said by the page I linked up there, and Instances do not become nil when destroyed, so your reference in the table will never be deleted until you make the reference to the instance you destroyed nil as well.

11 Likes