Closed isovic closed 7 years ago
Also, what happens here if numPositionsSHW
here is <=0
?
https://github.com/Martinsos/edlib/blob/master/edlib/src/edlib.cpp#L178
Ivan
Thanks, good find! How did you do the profiling, with which tool? I fixed the problem with c19a0754aec29a88e01ab76c3a1357eaa9f1f10e, and added better documentation for internal functions. Nothing happens if it is <= 0 since its initial value is never used, it is used only to return the number of positions that were found.
Np.
Just Valgrind actually :-)
valgrind --tool=memcheck --leak-check=full
Great - I added checking for memory leaks to Travis with 75c50ceffdeef1fb6c582fa94eaae9919ab85510, so now I will be sure that all is fine.
Awesome, I didn't know about --error-exitcode
. I will use it in the future :-)
Hi Martin, here is a bit I found when profiling:
Memory for
positions
here is allocated usingmalloc
:https://github.com/Martinsos/edlib/blob/master/edlib/src/edlib.cpp#L550 But freed here using
delete[]
:https://github.com/Martinsos/edlib/blob/master/edlib/src/edlib.cpp#L179
Best regards, Ivan.