microsoft / angle

ANGLE: OpenGL ES to DirectX translation
Other
615 stars 166 forks source link

IFrameworkView::Uninitialize() is not called #53

Closed ip closed 8 years ago

ip commented 8 years ago

I am trying to properly dispose resources in my app. I used default template, in which main application class is called WindowsApp and inherited from Windows::ApplicationModel::Core::IFrameworkView.

In MSDN I have read that Windows Universal app is supposed to never exit in general case, however when OS decides to release it, the IFrameworkView::Uninitialize() will be called. But it doesn't. Any ideas?

coopp commented 8 years ago

I think IFrameworkView::Uninitialize( ) is not called for application termination events. I also am pretty sure it will only be called if the view is torn down while the application is running in the foreground. MSDN suggests that applications which manage user state should persist that data frequently, expecting to be terminated at anytime.

I will try and find some more information about this, but IFrameworkView::Uninitialize( ) may not be the best place to do what you are trying to do. Perhaps destructors in class implementations might be an avenue to pursue?

ip commented 8 years ago

@coopp Thanks for answering, I have tried to place my code in IFrameworkView destructor as well, the result is the same - it is not called. But I'm sure there should be some way to get notified about shutdown.

austinkinross commented 8 years ago

Hi there, I'm closing out this old issue.

Since this issue is loosely related to ANGLE and is more related to general UWP app development, I think you're more likely to find help over on the MSDN development forums than here. If you're still having trouble with this then I recommend posting a question on those forums.

Thanks!