I'm fairly new at MonoTouch development and am currently looking into memory
management. I have some AVFoundation code based on the CaptureManager
example from Xamarin which throws the DidReceiveMemoryWarning message.
Therefore I started reading up on the matter. I have figured out that
implementing ViewDidUnload and DidReceiveMemoryWarning is a common practice,
but am unsure as to what both method implementations usually look like. 

Currently I'm setting all my member variables to null in ViewDidUnload and
DidReceiveMemoryWarning is basically doing nothing. I'm using a
NavigationController to handle the navigation and have read that clearing
all the views that aren't shown from memory is also recommended but I
haven't really figured out how. Is there any best practice that people use
to implementing these two methods?

Another thing I'm wondering is the following. If I have a ViewController
which I push onto the NavigationController and push a new instance of the
same ViewController again later in the application flow, do both instances
stay in memory? 

Thanks in advance,

devnl



--
View this message in context: 
http://monotouch.2284126.n4.nabble.com/What-s-best-practice-in-implementing-DidReceiveMemoryWarning-tp4656729.html
Sent from the MonoTouch mailing list archive at Nabble.com.
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to