src: do not use `std::function` for `OnScopeLeave`
Using std::function
adds an extra layer of indirection, and in
particular, heap allocations that are not necessary in our use case
here.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines