We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
作者,你好 如书中所说,WeakLog4GDelgate 的目的是防止 delegate 数组对元素进行强引用,未解决,所以用 WeakLog4GDelegate 包装一遍,用 weak 修饰以后,再放入数组。
对此,NSPointArray 完全能解决这个问题:
var a: NSPointerArray = NSPointerArray(options: [.weakMemory])
类似容器类型还有:NSHashMap,NSHashTable 等。
NSHashMap
NSHashTable
不知在此使用这些容器类进行解决,是否与原意冲突。
The text was updated successfully, but these errors were encountered:
感谢反馈,对NSPointerArray不太了解,如果你有兴趣可否将Log4G改写后提一个PR给我,我最近打算将所有的组件库都先支持下Carthage,所以短期内不太有时间来优化这一块
NSPointerArray
Carthage
Sorry, something went wrong.
感谢 @saitjr 提供的PR,后续我会将其他组件库中相似的逻辑一并替换成NSHashTable的实现,在1.2.0发布
No branches or pull requests
作者,你好
如书中所说,WeakLog4GDelgate 的目的是防止 delegate 数组对元素进行强引用,未解决,所以用 WeakLog4GDelegate 包装一遍,用 weak 修饰以后,再放入数组。
对此,NSPointArray 完全能解决这个问题:
var a: NSPointerArray = NSPointerArray(options: [.weakMemory])
类似容器类型还有:
NSHashMap
,NSHashTable
等。不知在此使用这些容器类进行解决,是否与原意冲突。
The text was updated successfully, but these errors were encountered: