How to properly free\release memory allocated by pcre2_get_ovector_pointer method of pcre2 library?
For example:
PCRE2_SIZE *ovector;
ovector = pcre2_get_ovector_pointer(match_data);
So, how to release the ovector pointer?
You shouldn't. ovector
points to data within match_data
.
You need to free match_data
using.
pcre2_match_data_free(match_data);