@@ -184,8 +184,10 @@ - (void)dealloc
184184{
185185 // Sometimes the UIKit classes can call back to their delegate even during deallocation, due to animation completion blocks etc.
186186 _isDeallocating = YES ;
187+ NSLog (@" before dealloc - delegate - %@ , datasource - %@ , proxyDelegate - %@ , proxyDatasource - %@ " , self.asyncDelegate, self.asyncDataSource, _proxyDelegate, _proxyDataSource);
187188 [self setAsyncDelegate: nil ];
188189 [self setAsyncDataSource: nil ];
190+ NSLog (@" after dealloc - delegate - %@ , datasource - %@ , proxyDelegate - %@ , proxyDatasource - %@ " , self.asyncDelegate, self.asyncDataSource, _proxyDelegate, _proxyDataSource);
189191}
190192
191193/* *
@@ -267,6 +269,8 @@ - (void)setAsyncDataSource:(id<ASCollectionViewDataSource>)asyncDataSource
267269 _asyncDataSourceImplementsConstrainedSizeForNode = ([_asyncDataSource respondsToSelector: @selector (collectionView:constrainedSizeForNodeAtIndexPath: )] ? 1 : 0 );
268270 }
269271
272+ NSLog (@" setAsyncDataSource - %@ , proxy - %@ , deallocating - %d " , asyncDataSource, _proxyDataSource, _isDeallocating);
273+
270274 super.dataSource = (id <UICollectionViewDataSource>)_proxyDataSource;
271275}
272276
@@ -292,6 +296,8 @@ - (void)setAsyncDelegate:(id<ASCollectionViewDelegate>)asyncDelegate
292296 _asyncDelegateImplementsInsetSection = ([_asyncDelegate respondsToSelector: @selector (collectionView:layout:insetForSectionAtIndex: )] ? 1 : 0 );
293297 }
294298
299+ NSLog (@" setAsyncDelegate - %@ , proxy - %@ , deallocating - %d " , asyncDelegate, _proxyDelegate, _isDeallocating);
300+
295301 super.delegate = (id <UICollectionViewDelegate>)_proxyDelegate;
296302
297303 [_layoutInspector didChangeCollectionViewDelegate: asyncDelegate];
0 commit comments