Leak in std::function with clang
Created by: stephanemagnenat
Recent refactoring of Switch in branch http-refactor
uses std::function
to store handlers of HTTP queries in a map (see definition at switches/http2/http/HttpDispatcher.h
:38 at commit e9fa8da5, leaks arises at switches/http2/http/HttpDispatcher.cpp
:232). With clang (3.8 on Ubuntu 16.04 x86-64) this code leaks, detected both with valgrind and clang's own LeakDetector. This code should be tested with other platforms/compilers/versions and if the problem is confirmed to be clang-specific, a minimal test case should be done and the problem reported.