Hello Shawn,

The ViewDidUnload method is called automatically when your app receives a
memory warning. Until then, its view hangs around and consumes memory. If
you don't need your ViewController and View, you should dispose the
controller.

If you simply don't need a view, you may call the DidReceiveMemoryWarning
method and the iOS will unload view for you automatically.

Thanks,
Ivan

2011/11/1 shawnlehner <[email protected]>

> I am having a hard time wrapping my brain around the proper way to do this
> using MonoTouch. Normally you create your view controller, and you add that
> controller's view for display. Once you are finished with that view you
> remove it from view. The view you removed hangs around for quick loading
> later until there is a memory warning, at which point the view is unloaded,
> the viewDidUnload method is called, and you cleanup for your view.
>
> In MonoTouch, the ViewDidUnload method does not seem to ever be called. Can
> someone clarify exactly how this should work? Is there a way to forcefully
> have a UIViewController dispose of its view?
>
> Thanks
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/Proper-UIViewController-UIView-handeling-tp3964036p3964036.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to