Make static hostpolicy context a shared pointer (dotnet/core-setup#7964)
authorElinor Fung <47805090+elinor-fung@users.noreply.github.com>
Thu, 5 Sep 2019 04:23:24 +0000 (21:23 -0700)
committerGitHub <noreply@github.com>
Thu, 5 Sep 2019 04:23:24 +0000 (21:23 -0700)
commitf65655ecec23bbd067e502205269a48c4d184202
treea32d66b84d3a756d313cccd90252f32ca17ade62
parent34250be19ecb62fba1915e38a2ca9ef9c82b01db
Make static hostpolicy context a shared pointer (dotnet/core-setup#7964)

Make static hostpolicy context a shared pointer so that it won't get
destructed as part of exit if it is in use by another thread

Commit migrated from https://github.com/dotnet/core-setup/commit/61303f4523b934b3dadd825525a3acbac18bb23e
src/installer/corehost/cli/hostpolicy/hostpolicy.cpp