YYCache
YYCache copied to clipboard
_trimToCost:costLimit函数最后一段什么意思
嗨,大神,在- (void)_trimToCost:(NSUInteger)costLimit代码最后一段什么意思呢,[holder count]只是获取到数组的个数呀
if (holder.count) {
dispatch_queue_t queue = _lru->_releaseOnMainThread ? dispatch_get_main_queue() : YYMemoryCacheGetReleaseQueue();
dispatch_async(queue, ^{
[holder count]; // release in queue
});
}
只是在block里持有一下holder 让holder暂时不销毁,等到指定的队列中去销毁 [holder count]; // release in queue,看评论里看到的。。
原来如此啊😀