Intermittent failure of associated boolean values
samodom opened this issue · comments
Sam Odom commented
See tests using UIWebView.loadHtmlStringCalled
Sam Odom commented
It appears this is due to multiple keys having the same pointer address -- hence, they are the same keys.
Sam Odom commented
The solution that is working for me now is to allocate C strings and point to them -- I'm using UUIDs to generate unique strings:
private let keyString = NSUUID().uuidString.cString(using: .utf8)!
let key = ObjectAssociationKey(keyString)