Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions content/en-us/reference/engine/classes/CollectionService.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,15 @@ methods:
signal created by `Class.CollectionService:GetInstanceAddedSignal()` with
the given tag.

**Warning:** When tagging an instance, it is common that some resources
are used to give the tag its functionality, e.g. event connections or
tables. To prevent memory leaks, it is a good idea to clean these up
##### Warnings

- An instance's tags that were added client-side will be dropped if the server
later adds or removes a tag on that instance, because the server replicates all
tags together and overwrites previous tags.

- When tagging an instance, it is common that some resources
are used to give the tag its functionality, for example event connections or
tables. To prevent memory leaks, it's a good idea to clean these up
(disconnect, set to nil, etc) when no longer needed for a tag. Do this
when calling `Class.CollectionService:RemoveTag()`, calling
`Class.Instance:Destroy()` or in a function connected to a signal returned
Expand Down
2 changes: 2 additions & 0 deletions content/en-us/reference/engine/classes/Instance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,8 @@ methods:
already applied. Successfully adding a tag will fire a signal created by
`Class.CollectionService:GetInstanceAddedSignal()` with the given tag.
**Warning:** An instance's tags that were added client-side will be dropped if the server later adds or removes a tag on that instance, because the server replicates all tags together and overwrites previous tags.
Note that when tagging an instance, it's common that some resources are
used to give the tag its functionality, for example event connections or
tables. To prevent memory leaks, it's a good idea to clean these up
Expand Down
Loading