On Wed, 11 May 2022 16:36:26 GMT, Artem Semenov <aseme...@openjdk.org> wrote:
>>> It seems to me that here it is necessary to release the cache. >> >> I am not so sure. Why would we do that? I mean - we removed all the records >> from the cache and even if we would release it we would have to immediately >> re-create it otherwise the very next operation will crash since we will be >> trying to call objectForKey selector upon nil. So what is the point in >> releasing the now empty dictionary? > > Ok. If we are removing "all records from the cache", can't we use [removeAllObjects](https://developer.apple.com/documentation/foundation/nsmutabledictionary/1408955-removeallobjects?language=objc) Guess that will be more optimized.. ------------- PR: https://git.openjdk.java.net/jdk/pull/8636