NSInteger -> NSUInteger, add getter method
This commit is contained in:
parent
c7f2665d05
commit
c3ee589681
|
@ -35,7 +35,7 @@ typedef enum SDImageCacheType SDImageCacheType;
|
||||||
/**
|
/**
|
||||||
* The maximum "total cost" of the in-memory image cache. The cost function is the number of pixels held in memory.
|
* The maximum "total cost" of the in-memory image cache. The cost function is the number of pixels held in memory.
|
||||||
*/
|
*/
|
||||||
@property (assign, nonatomic) NSInteger maxMemoryCost;
|
@property (assign, nonatomic) NSUInteger maxMemoryCost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum length of time to keep an image in the cache, in seconds
|
* The maximum length of time to keep an image in the cache, in seconds
|
||||||
|
|
|
@ -338,11 +338,16 @@ static const NSInteger kDefaultCacheMaxCacheAge = 60 * 60 * 24 * 7; // 1 week
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)setMaxMemoryCost:(NSInteger)maxMemoryCost
|
- (void)setMaxMemoryCost:(NSUInteger)maxMemoryCost
|
||||||
{
|
{
|
||||||
self.memCache.totalCostLimit = maxMemoryCost;
|
self.memCache.totalCostLimit = maxMemoryCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSUInteger)maxMemoryCost
|
||||||
|
{
|
||||||
|
return self.memCache.totalCostLimit;
|
||||||
|
}
|
||||||
|
|
||||||
- (void)clearMemory
|
- (void)clearMemory
|
||||||
{
|
{
|
||||||
[self.memCache removeAllObjects];
|
[self.memCache removeAllObjects];
|
||||||
|
|
Loading…
Reference in New Issue