Compiler Error C2031
a virtual destructor with 'accessibility' accessibility is not allowed for this type
a virtual destructor must have 'public' accessibility
A virtual Windows Runtime class has an access specifier or sealed
specifier that's not allowed for a virtual destructor. For more information, see Ref classes and structs.
To fix this error, change the accessibility of the destructor.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for