So I have been building my own ListView control for iOS. Basically I needed to create a really high performance ListView control with recycling, support for uneven row heights, on the fly expanding items with animations and so on. Everything has been going really great and I have a really fast and powerful ListView with native speed. To be able to do this and still use Xamarin.Forms views inside my custom cells I have used the "Platform.CreateRenderer()" method to convert a Xamarin.Forms View into a native UIView. This has also worked great despite some layout issues which I have made workarounds for.
Now however I notice that anything you send into var
myNativeView = Platform.CreateRenderer(xamarinFormsViewObject)
never get's garbage collected... So I was basically finished and now I notice this will give me memory problems.
Does anyone have an idea If you can do something to release the View object? It's something inside the Renderer that is holding the reference. Have tried calling myNativeView.Dispose and myNativeView.SetElement(null) but nothing is working so far...