Compiled Regex expressions are not garbage collected, so it is up to the programmer to release them when done. They take up very little space and if they are reused often it's acceptable to compile them at boot and never release them.
local re = regexcompile("([0-9]+)")
...
re = regexfree(re)
By storing the
null return from
regexrelease it lower the risk that it will be used again after releasing.