You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Python, Ruby and PHP wrappers leak memory. The C string returned from cmark_markdown_to_html must be freed (by calling free) after converting to a host language string. I recently fixed this for cmark.py in dfad5a9.
The text was updated successfully, but these errors were encountered:
Good point. I don't have time (or perhaps expertise) to fix these, but it would be great if someone could. Otherwise I'd suggest adding comments to them indicating that they are just simple examples and don't free memory, and perhaps linking to cmark.py in cmark for a more solid example?
PHP frees it's memory automatically when the pointer goes out of scope, so there is no memory leak.
But just to keep the examples consistent, I created the following PR: #545
The Python, Ruby and PHP wrappers leak memory. The C string returned from
cmark_markdown_to_html
must be freed (by callingfree
) after converting to a host language string. I recently fixed this forcmark.py
in dfad5a9.The text was updated successfully, but these errors were encountered: