I have a question about how resources mentioned in Application.Resources in App.xaml.cs are managed when tombstoning happens. Are they recreated via constructor? Or are they serialized and deserialized? Or are they kept somewhere around like PhoneApplicationService.Current.State?
I’m concerned because I store a Ninject Kernel there via a wrapper object. Kernel is constructed and fully bind in that object’s constructor. That Kernel keeps references to my View Models. I want to cache the View Models before the tombstoning, preferably in their entirety (they’re serializable). I’m not sure is Ninject’s Kernel is serializable, but it’s another question.
So if my Kernel’s wrapper will be reconstructed and re-bound, it will defeat the purpose of caching View Models instances. That’s why I need to know.
You’ll get a new instance via constructor. It’s fairly simple to set up and test this in the emulator by setting the project property to force tombstoning upon deactivation.