Closed CarlosNihelton closed 1 year ago
Hi Alan, thanks for this nice piece of software!
edlib README quite misleading in its first snipped of code suggesting a memory leak. Downwards it explains that the result of edlibAlign must be freed. See https://github.com/Martinsos/edlib#handling-result-of-edlibalign
edlib
edlibAlign
It's a C API after all. This PR wraps the EdlibAlignResult into a local struct to ensure calling edlibFreeAlignResult at scope exit.
EdlibAlignResult
edlibFreeAlignResult
The screenshot below shows heaptrack analyzing the output data of the clang-unformat program running with the same parameters mentioned in #3 .
heaptrack
clang-unformat
Fixes #3
Hi Alan, thanks for this nice piece of software!
edlib
README quite misleading in its first snipped of code suggesting a memory leak. Downwards it explains that the result ofedlibAlign
must be freed. See https://github.com/Martinsos/edlib#handling-result-of-edlibalignIt's a C API after all. This PR wraps the
EdlibAlignResult
into a local struct to ensure callingedlibFreeAlignResult
at scope exit.The screenshot below shows
heaptrack
analyzing the output data of theclang-unformat
program running with the same parameters mentioned in #3 .Fixes #3