It is my understanding that ISpellChecker::Suggest returns an IEnumString interface. The official documentation for the interface's IEnumString::Next method is a fair bit cryptic.
Under the premise that callers of IEnumString::Next do acquire ownership of the pointed-to memory, this section of code would need to be updated with a call to CoTaskMemFree (I guess) to free resources.
Yes, that's right - I wrote about that here: https://visualstudiomagazine.com/articles/2013/08/01/using-the-c-spell-checking-api.aspx
Should I prepare a pull request fixing those issues (both from the IEnumString iterator as well as the get_Replacement call)?
Thanks, that would be great!