drasto

Slovakia/Czech republic

Age: 28

20h
revised How to add language to NSSpellChecker's available languages?
edited tags
20h
comment How to clear font cache filled with emoji characters?
Yes, this is my backup plan. It has some dowsides trough: Those .PNGs will increase size of app download size by around 15 MB, I will have some 800 extra files in my project, some extra work that I believe should not be neccessary...
Jul
3
revised How to add language to NSSpellChecker's available languages?
added 2 characters in body
Jul
3
asked How to add language to NSSpellChecker's available languages?
Jul
3
revised How to clear font cache filled with emoji characters?
edited body
Jul
1
comment How to clear font cache filled with emoji characters?
I tried your suggestion with no success. I am now drawing the emoji directly with NSLayoutManager, character codes are stored in NSTextStorage. Even if I make sure that all classes used for rendering are released, the memory is not freed. I can only guess that the glyphs are cached even deeper, perhaps in NSGlyphGenerator but that class is private API on iOS.
Jul
1
revised How to clear font cache filled with emoji characters?
added 7 characters in body
Jul
1
comment How to clear font cache filled with emoji characters?
I am not loading any images in my code directly. I am just adding labels to UICollectionViewCells and the text of those lables are emojis unicode characters like this: πŸ˜€πŸ˜Šβ˜ΊοΈ. Internally, they are probably PNGs, but I cannot afftect the way they are loaded. If UIKit uses [UIImage imageNamed:] internally to load them I cannot change it. Please see my edit.
Jul
1
revised How to clear font cache filled with emoji characters?
added 2340 characters in body
Jul
1
revised How to clear font cache filled with emoji characters?
edited title
Jul
1
asked How to clear font cache filled with emoji characters?
Jul
1
comment iPhone font caching
While that is generally true, it is not true when you need to display a lot of emoji characters. Those glyphs consume a lot of memory (in my case 15 MB!) especially when displayed in big font. My app is memory sensitive and I would put those extra 15 MB for much better use if I knew how to free that memory. Is there a way to clen that font cache?
Jun
23
accepted How to debug memory leaks when Leaks instrument does not show them?
Jun
23
comment How to debug memory leaks when Leaks instrument does not show them?
Yes, but it shows me where all strong references were established through the history of the object. That is of almost no use given typical program flow where many references are retained and released. I am only interested unreleased strong references and I only get their count: how many of them there is at the moment (number in RefCt column in very last row). All those retained and then released references are just spamming the table for me. Too much information without the ability to find those parts I really need is usually the same as no information.
Jun
23
comment How to debug memory leaks when Leaks instrument does not show them?
Thank you. The procedure you suggested is probably the best use of instruments for detecting strong cycles. However, that is still not very usefull. I can see what is the reference count for particual class at the moment but what I would really need is what objects hold those references... But that's poor design of instruments, your answer is great. Thank you!
Jun
23
awarded Notable Question
Jun
23
asked How to debug memory leaks when Leaks instrument does not show them?
Jun
18
comment can't link with a main executable file
+50 Saved my day! This is super-conterintuitive, huge bug in XCode!
Jun
16
comment Files returned by NSFileManager.contentsOfDirectoryAtURL do not exist according to NSFileManager.fileExistsAtPath?
I already did that - I have complete path. Thank you for ideas anyway.
Jun
16
comment Files returned by NSFileManager.contentsOfDirectoryAtURL do not exist according to NSFileManager.fileExistsAtPath?
I think this is not correct solution. Before checking whether the file exists I am calling absoluteString on each NSURL returned by contentsOfDirectoryAtURL. That efectively expands path relative to bundle's resource directory to absolute path but fileExistsAtPath check still returns false. However I might just misuderstood your answer. Could you provide code sample?
1 2 3 4 5