Repair memory release in the iPad environment
In the iPad environment, NSCache lead to anonymous VM very high, if reaches a certain value, app will be crash. Because of SDImageCache don't clear memory when receive memory warning notification, modify define TARGET_OS_IPHONE to TARGET_OS_IOS can resolve this issue.
This commit is contained in:
parent
19041b44c2
commit
5cc5abae03
|
@ -126,7 +126,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||
_fileManager = [NSFileManager new];
|
||||
});
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#if TARGET_OS_IOS
|
||||
// Subscribe to app events
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(clearMemory)
|
||||
|
|
Loading…
Reference in New Issue