Reputation: 7674
I’m trying to understand the memory management needed in Xamarin.iOS.
In the following scenario, does this.NavigationController.PopToRootViewController release the created UIViewControllers or should I release them? If I need to do it, where should this be done?
Each letter represent a UIViewController)
A ( rootViewcontroller)
from A:
B b = new B()
this.NavigationController.PushViewController (b, true);
From B:
C c = new C()
this.NavigationController.PushViewController (c, true);
From C:
D d = new D()
this.NavigationController.PushViewController (d, true);
From D:
this.NavigationController.PopToRootViewController(true);
Upvotes: 0
Views: 194
Reputation: 32694
Can you enable "Use Reference Counting Extension"? This will take care of this for you.
Upvotes: 1