src: prefer OnScopeLeave over shared_ptr<void>
They do the same thing, but OnScopeLeave avoids an extra heap allocation and is more explicit about what it does.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines