...
|
...
|
@@ -298,13 +298,22 @@ static SDImageCache *instance; |
|
|
|
|
|
- (void)removeImageForKey:(NSString *)key
|
|
|
{
|
|
|
[self removeImageForKey:key fromDisk:YES];
|
|
|
}
|
|
|
|
|
|
- (void)removeImageForKey:(NSString *)key fromDisk:(BOOL)fromDisk
|
|
|
{
|
|
|
if (key == nil)
|
|
|
{
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
[memCache removeObjectForKey:key];
|
|
|
[[NSFileManager defaultManager] removeItemAtPath:[self cachePathForKey:key] error:nil];
|
|
|
|
|
|
if (fromDisk)
|
|
|
{
|
|
|
[[NSFileManager defaultManager] removeItemAtPath:[self cachePathForKey:key] error:nil];
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- (void)clearMemory
|
...
|
...
|
|