Created
June 29, 2017 10:01
-
-
Save Bashta/af7cfbad1080cf8f6211b6c95aadfff3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 size = chacheDictionary.keys.reduce(0) { (result, key) -> Int in | |
| return result + malloc_size(Unmanaged.passRetained(key as AnyObject).toOpaque()) + malloc_size(Unmanaged.passRetained(chacheDictionary[key] as AnyObject).toOpaque()) | |
| } | |
| print(size) | |
| //500bytes per obj in median. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment