-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Controller doesn't deallocate when ASCollectionNode AsyncDelegate is set #1868
Comments
@iwheelbuy: I'm not aware of any issues in ASDK that should cause this. The best way to debug this is probably to use the Memory Graph / Debugger in XCode 8, which allows exploring object's retain relationships. If you provide us with some more code (feel free to post a sample project here or email your code to AsyncDisplayKit@gmail.com) we can try to help out. It's possible that you have inadvertently created a retain cycle. Also, FYI, in the future you can just do |
@iwheelbuy check out minute 48:30 in the state of the union, it shows the Memory Graph thing - https://developer.apple.com/videos/play/wwdc2016/102/ Would love to help find your issue if you can share some of your code, or of course a reproduction case. If you set the asyncDelegate / delegate to nil, does it deallocate? |
Hello again. I've found a place with a retain cycle. It took me hours to understand that I should carefully explore not only ASCollectionDelegate methods. The retain cycle was in one of ASCollectionDataSource methods:
Anyway, I have fixed a problem. But now I have a new question:
I would love to get an answer for a new question. |
@iwheelbuy Could you clarify what the retain cycle was? Referencing self in that instance / delegate method should not be an issue... Regarding the delegate / datasource, that's a good question for @levi. A similar issue is described / fixed here: #1740 |
@appleguy
I hope I use a word Well, I really hope @levi will fix it some day. I will inform my team about such weird behaviour and we will move firther (: |
Hello. I expect all controllers in my project to be deallocated when they are removed from UINavigationController stack. It looks like this:
"Deallocated " My.ControllerType.ProfileCity_18
"Deallocated " My.ControllerType.Question_13
"Deallocated " My.ControllerType.Profile_15
"Deallocated " My.ControllerType.Settings_19
But there is one controller that doesn't deallocate and this controller is based on ASCollectionNode. And I've found that it doesn't deallocate only when AsyncDelegate is set
collectionNode.view.asyncDelegate = self
I have no idea how to fix it. Any feedback is welcome.
The text was updated successfully, but these errors were encountered: