Memory leak detected by Valgrind in cv::resize

This looks like Thread Local Storage (TLS) allocation. This memory will be allocated once for each thread in the thread pool and will not be freed until program exits. It should not cause problems unless you create new threads many times (internal OpenCV thread pool does not do this).

So this finding can be ignored unless the leak grows with e.g. each iteration of some loop. Try to repeat function call multiple times and check the size of the lost memory. If it grows - the leak is a problem.

1 Like