As already noted, this is because you will not catch the exception. As standard notes:
C ++ 11 ยง15.3 / 9 :
"If no matching handler is found, the std::terminate() function is called, regardless of whether the stack was unwound before this call to std::terminate() determined by the implementation."
Although I think this is not specifically related to the stack in your case, the same principle will be here. Thus, it really depends on the implementation if any memory is cleared. As we see here, this is usually not the case, because the operating system clears the memory anyway.
source share