Reputation: 99
Is there a way that I could retrieve the NSAttributedString from my CTFramesetter? When I keep the Framesetter [and the NSMutableAttributedString that it uses via (__bridge CFAttributedStringRef)] in memory, I see a second CFString with about the same size in instruments. When I release the CTFramesetter property, there's only the original String left in memory. Because the String can have a size up to 1.5MiB, it would be great if I could just release the original one and use the "embedded" one to do further drawing.
Many thanks
Upvotes: 0
Views: 491
Reputation: 385660
If you don't need the attributed string to remain mutable, make an immutable copy before you create the framesetter. Release the mutable original and use the immutable copy to create the framesetter.
Upvotes: 1