- Using Xcode Instruments run the application with Allocations
- Use
ViewController
in theInstrument Detail
search view in Xcode Instruments - notice there is onlyItemsViewController
andAboutViewController
- Tap on
AddItem
and you'll see a new view controller in Xcode Instruments -ItemNewViewController
- Tap
Back
and you'll see thatItemNewViewController
is not deallocated in Xcode Instruments - Comment the
ViewDidLoad
method inItemNewViewController
and uncomment theViewWillAppear
/ViewWillDissapear
methods - Do the steps above once again an you'll see that
ItemNewViewController
is deallocated after tappingBack
cosminstirbu/xamarin-memory-demo
Explore Memory Issues on VS for Mac default Native Xamarin Application
C#