I have the following structure in my app (iPad, iOS 5):
UIView1 --> UIView2 (presented modal).
I have a custom class dealing with a REST Service. This Class handles all the mapping, routing, etc. needed. There is an object in UIView1 using this class.
From UIView1 i present the UIView2 (modal) which has a UIWebView included, showing some HTML Content and some PDF Documents (depending what was chosen in UIView1 by the User).
Sometimes it looks like UIView1 get'S deallocated in background while the user is in UIView2.
If the User now closes UIView2 to return to UIView1, the app crashes. The Error is kind of "RestKit Mapping for ... exists".
It looks to me, that UIView1 was deallocated, and now is build up in background, but the RestKit object still lives. RestKit is a Shared Object (Singleton).
What is the correct way to get this runnning?