mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix retain cycle in basic, cache-less ASNetworkImageNodes
This should not directly affect more complex apps that don't use the ASBasicImageDownloader. Also disables the default-on text placeholders, as they churn memory during the measurement pass. These were intended to be written with pure layers (without using backing stores), so I don't think it is a reasonable default-on behavior until that is fixed.
This commit is contained in:
@@ -16,8 +16,8 @@
|
||||
@interface ASNetworkImageNode ()
|
||||
{
|
||||
ASDN::RecursiveMutex _lock;
|
||||
id<ASImageCacheProtocol> _cache;
|
||||
id<ASImageDownloaderProtocol> _downloader;
|
||||
__weak id<ASImageCacheProtocol> _cache;
|
||||
__weak id<ASImageDownloaderProtocol> _downloader;
|
||||
|
||||
// Only access any of these with _lock.
|
||||
__weak id<ASNetworkImageNodeDelegate> _delegate;
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
return [self initWithCache:nil downloader:[[ASBasicImageDownloader alloc] init]];
|
||||
return [self initWithCache:nil downloader:[ASBasicImageDownloader sharedImageDownloader]];
|
||||
}
|
||||
|
||||
- (void)dealloc
|
||||
|
||||
Reference in New Issue
Block a user