Static destruction in UWP c++

Андрей Вахрушев 96 Reputation points
2020-08-17T12:53:56.63+00:00

The c++ static destructors seem to never execute for me during UWP app termination, as I expect they should. I am unable to break and step through them in the debugger.
I did some search, and there are people asking essentially the same thing here and there - why isn't my destruction code being executed? - and there is not a proper definite answer that I can find.

There are resources describing the UWP app lifecycle, and how an app would be suspended and then possibly terminated. The suspended > terminated transition is pictured as passive, so much that it is even omitted from some of the state diagrams. While this probably makes sense from the abstract Lifecycle of a Managed App standpoint, the implementation side of things remains undocumented.

Is UWP really not required to execute all the code prescribed by the language standard? Or if it does, how do I see that in the debugger?

https://learn.microsoft.com/en-us/windows/uwp/launch-resume/app-lifecycle#app-execution-state

Universal Windows Platform (UWP)
{count} votes