> Each time I push a new controller onto the navigation stack, a
> new instance gets pushed onto it. That seems like a waste of memory. Any
> pointers?

You need a new instance each time because each pushed view controller can 
have its own state. Even if you push the same type of view controller 3 
times you might make changes to one, then drill down to another and make 
changes to it, then drill down to yet another. If the user hits the back 
button then whatever state changes they had made previously in each 
instance should be preserved. That's what the view controller does. It 
preserves state.

If there is something (other than views and state) which takes a lot of 
memory and can be shared then you could encapsulate that into some shared 
resource among them, but the views and the view controllers must be 
separate because they have their own unique state.
--
Adam Kemp
[email protected]
(512) 683-6058
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to