目录
目录README.md

WeakMapTable

Swift CocoaPods Build Status CodeCov

A weak-to-strong map table. It is inspired by NSMapTable but guarantees thread safety and deals better with weak references. NSMapTable.weakToStrongObjects() doesn’t free the value object when the key object is deallocated but WeakMapTable does.

APIs

public func value(forKey key: Key) -> Value?
public func value(forKey key: Key, default: @autoclosure () -> Value) -> Value
public func forceCastedValue<T>(forKey key: Key, default: @autoclosure () -> T) -> T
public func setValue(_ value: Value?, forKey key: Key)

Installation

Podfile

pod 'WeakMapTable'

License

WeakMapTable is under MIT license. See the LICENSE file for more info.

关于
42.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号