-
-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
If CuredString implemented AutoClosable, it would allow it to be used with try-with-resources statements to automatically destroy the string once it goes out of scope.
try (final CuredString curedString = new CuredString("vEⓡ𝔂 𝔽𝕌Ňℕy ţ乇𝕏𝓣 wWiIiIIttHh l133t5p3/-\\|<")) {
// Use `curedString`...
}
// Once the `try` scope is finished, the string will be destroyed.This means the caller does not have to explicitly call destroy, which is easily forgotten.
Is there a reason why this hasn't been done? If not, I would be open to making a pull request to add this.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request