From ac5ec6997cb67e9ec067a9a4fe73a6308a68c6b6 Mon Sep 17 00:00:00 2001 From: DreamPiggy Date: Tue, 19 Dec 2017 13:11:51 +0800 Subject: [PATCH] Fix the way remove all elements from pointer array --- SDWebImage/UIImageView+WebCache.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/SDWebImage/UIImageView+WebCache.m b/SDWebImage/UIImageView+WebCache.m index be289db8..b25a234f 100644 --- a/SDWebImage/UIImageView+WebCache.m +++ b/SDWebImage/UIImageView+WebCache.m @@ -134,9 +134,7 @@ static char animationLoadOperationKey; [operation cancel]; } } - for (size_t i = 0; i < operationsArray.count; i++) { - [operationsArray removePointerAtIndex:i]; - } + operationsArray.count = 0; } } }