Use the same PCRE function for freeing up the memory as nre.nim does.
This commit is contained in:
parent
8f198db2ca
commit
9d4190a5cc
2 changed files with 1 additions and 2 deletions
|
|
@ -440,7 +440,6 @@ proc extractOptions(pattern: string): tuple[pattern: string, flags: int, study:
|
|||
|
||||
proc destroyRegex(pattern: Regex) =
|
||||
pcre.free_substring(cast[cstring](pattern.pcreObj))
|
||||
pattern.pcreObj = nil
|
||||
if pattern.pcreExtra != nil:
|
||||
pcre.free_study(pattern.pcreExtra)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue