mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Our libcache implementation of swift::sys::Cache was broken for ref-counted values (which are used by e.g. the SourceKit ASTManager). It would always `retain(value)` in `set(key, value)`, but under the hood libcache shares values, so we would only get one `release(value)` if the same value was used across multiple keys, or if the same value *and* key were set multiple times. This was causing us to never release ASTs cached by SourceKit even when the underlying libcache purged itself under memory pressure. rdar://problem/21619189
7.4 KiB
7.4 KiB