Freeing memory of tidyReleaseDate()
Status: Beta
Brought to you by:
fcarlier
In the C# wrapper, in the Tidy.Cs on line the property ReleaseString frees memory it hasn't allocated. The C TidyHtml examples don't free this memory either, and it causes a crash on FreeBSD:
New code:
---
public static string ReleaseString
{
get
{
IntPtr releaseDate = TidyWrapper.tidyReleaseDate();
string value = Marshal.PtrToStringAnsi(releaseDate);
// Crashes: Marshal.FreeBSTR(releaseDate);
return value;
}
}
---