Skip to content

scope should invoke :disconnect() and :Disconnect methods#441

Merged
dphfox merged 1 commit intodphfox:mainfrom
LDGerrits:main
Feb 2, 2026
Merged

scope should invoke :disconnect() and :Disconnect methods#441
dphfox merged 1 commit intodphfox:mainfrom
LDGerrits:main

Conversation

@LDGerrits
Copy link
Contributor

While scope already handles RBXScriptConnection, developers will naively assume that it would also handle custom table-based objects with disconnect() or Disconnect() methods, as is standard in other popular libraries like Maid or Trove.

This change updates the internal cleanup logic to support the :disconnect() and :Disconnect() methods. It also adds 2 additional unit tests to ensure they are handled correctly and updates the documentation to reflect the change.

Before: 385 passed, 1 failed, 13 skipped.
After: 387 passed, 1 failed, 13 skipped.

@dphfox dphfox merged commit 2790f7b into dphfox:main Feb 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants