Created
September 8, 2022 17:11
-
-
Save kiarashvosough1999/1557a01e92f60e7f5ee47974f0a9d9b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let hashTable = NSHashTable<NSString>.weakObjects() | |
var str: NSMutableString? = NSMutableString.init(string: "dasdasdas") | |
hashTable.add(str) | |
str = nil | |
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { | |
print(hashTable.allObjects) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment