mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Disable creation of backing ASTable/CollectionNode for the *View varients (retain cycle).
This commit is contained in:
@@ -31,8 +31,10 @@
|
||||
|
||||
- (instancetype)_initWithTableView:(ASTableView *)tableView
|
||||
{
|
||||
if (self = [super initWithViewBlock:^UIView *{ return tableView; }]) {
|
||||
__unused ASTableView *tableView = [self view];
|
||||
// Avoid a retain cycle. In this case, the ASTableView is creating us, and strongly retains us.
|
||||
ASTableView * __weak weakTableView = tableView;
|
||||
if (self = [super initWithViewBlock:^UIView *{ return weakTableView; }]) {
|
||||
__unused __weak ASTableView *view = [self view];
|
||||
return self;
|
||||
}
|
||||
return nil;
|
||||
|
||||
Reference in New Issue
Block a user