Will Destroying a Folder delete all its contents?

Hello, I’m just wondering if using :Destroy() on a Folder in workspace will also delete all of its contents? I am trying to avoid memory leak so I want to make sure that whatever is in the folder isn’t still lingering around somewhere in memory after the command.

1 Like

Yes, everything that is a descendant of the object to be destroyed will also be destroyed.

Deleting any instance will delete all of its descendants.

Wow, that was quick. Thanks for the help!

1 Like

Yes, but any reference to those instances inside a running script will still remain.