ra1028 / Former

Former is a fully customizable Swift library for easy creating UITableView based form.
MIT License
1.3k stars 134 forks source link

Possible retain cycle #105

Open adriansergheev opened 4 years ago

adriansergheev commented 4 years ago

Hi, there is a possible retain cycle in the lib. I am saying possible because it is probably my code, but I can't see where it comes from so I am writing here,

Yet again i don't know if the issue is in the library or in the code, hopefully, I will find that out :)

Problem:

image

I think the problem lays somewhere here:

image image image

Everywhere where I do have a reference to self, i do if let self = self in the vc, but the header, FormSwitchCell and the header view for the cell does not get deallocated.

Former was declared like so:

image

Am I missing something? Thank you very much!

brommko commented 4 years ago

Hi,

I have the some problem, here is an image of the example app in memory graph:

Screenshot 2019-12-04 at 10 20 46

Thanks