locked
What is XAML app's counterpart of IFrameworkView.Uninitialize method

    Question

  • In a Direct3D app, we have the IFrameworkView.Uninitialize virtual function to uninitialize the application, I can release application resource in this function. However, in a XAML app, I could not find a function to do the job. It seems that App::OnSuspending may be the place but I am not sure. Could someone help?
    Friday, October 05, 2012 7:24 AM

Answers

  • If you are just talking about C++ memory then it won't leak: when the app is closed all of its memory is automatically freed.

    --Rob

    • Marked as answer by Leonard Saturday, October 06, 2012 11:38 PM
    Saturday, October 06, 2012 5:34 PM
    Owner

All replies

  • There isn't a direct analogy since the Xaml framework hands the IFrameworkView for you.

    Depending on what resources you are looking at you can either release them in OnSuspending and reacquire them in OnResume or you can just hang on to them and not directly release them.

    --Rob

    Friday, October 05, 2012 5:42 PM
    Owner
  • As my app is written in C++, if I hang on and do not release the resource, will there be a memory leak?
    Friday, October 05, 2012 11:47 PM
  • If you are just talking about C++ memory then it won't leak: when the app is closed all of its memory is automatically freed.

    --Rob

    • Marked as answer by Leonard Saturday, October 06, 2012 11:38 PM
    Saturday, October 06, 2012 5:34 PM
    Owner