migueldeicaza / MonoTouch.Dialog

Tools to simplify creating dialogs with the user using MonoTouch
MIT License
430 stars 211 forks source link

Extended Element.GetCell method to start reusing cells with DequeueReusableCell #245

Open desunit opened 7 years ago

desunit commented 7 years ago

I've noticed that TableView.DequeueReusableCell returns new cells (which in the end causes memory leaks) with every invoke if you call it with only 1 parameter DequeueReusableCell(key). Starting with iOS6 Apple added DequeueReusableCell(NSString reuseIdentifier, NSIndexPath indexPath) which guarantees the cell reuse but you can't access indexPath from GetCell method. I've changed code and add additional parameter for that.