0
votes

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);
1

1 Answers

1
votes

Can you enable "Use Reference Counting Extension"? This will take care of this for you.

enter image description here