Method RegEx():destroy() Foundation
Frees resources.
:destroy() --> self
This method returns self.
Releases all resources associated with the RegEx object, including compiled pattern and optimization data. This method must be called explicitly when done using a RegEx instance to prevent memory leaks.
Callling :destroy() invalidates the RegEx object and it can no longer be used for matching or other operations. Attempting to do so raises a runtime error.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.