Closed vanderhooft closed 7 years ago
Hi @vanderhooft
Thank you very much for the detailed info about this crash, it was really helpful.
I decided to get rid of the _cachedParentTable reference. Using __unsafe_unretained seems a bit dangerous and may lead to other difficult to debug crashes. Doing the lookup is fast enough and it's only done in specific moments (when swipe starts or ends). So it's not vital to cache it.
I just published 1.6.1 release with this fix included
Thanks for the update! Tested; works great.
Steps to reproduce:
crashes here: https://github.com/MortimerGoro/MGSwipeTableCell/blob/d623fb9c4c75f6c5bf7307eff961cb96073b439c/MGSwipeTableCell/MGSwipeTableCell.m#L978 objc[288]: Cannot form weak reference to instance (0x10212e200) of class UITableView. It is possible that this object was over-released, or is in the process of deallocation.
More info:
__weak
to__unsafe_unretained
seems to work (minimally tested.. but doesn't crash for me anymore) idea from: https://stackoverflow.com/questions/10904990/10905056#10905056