Open rysavyjan opened 5 years ago
There is as yet no mechanism to deregister plugins. We would need to add methods for each extension to deallocate any memory or objects allocated during their creation, and to track the created cmark_syntax_extension *
s in core-extensions.c
so we can free them.
@rysavyjan I use cmark_release_plugins();
to make my valgrind report w/o errors (unfortunately it's not possible to do ensure/register more than once, therefore I had to use std::atexit()
to release plugins).
After cmark_gfm_core_extensions_ensure_registered() is called, how should we unregister these plugins and free allocated memory?