Regex Guru

Friday, 6 November 2009

TPerlRegEx.CleanUp() Bugfix

Filed under: Regex Trouble — Jan Goyvaerts @ 16:28

Recent versions of TPerlRegEx were missing these two lines in the CleanUp() method after the call to pcre_dispose():

pattern := nil;
hints := nil;

Failing to set the pointers to nil caused TPerlRegEx to attempt to free them multiple times when reusing a TPerlRegEx instance with another regular expression. The latest version fixes this.

Download TPerlRegEx. Source is included under the MPL 1.1 license.

No Comments

No comments yet.

Sorry, the comment form is closed at this time.