Re: How heavy is NSLayoutManager?
Re: How heavy is NSLayoutManager?
- Subject: Re: How heavy is NSLayoutManager?
- From: Nick Zitzmann <email@hidden>
- Date: Tue, 2 Jun 2009 11:46:04 -0600
On Jun 2, 2009, at 10:50 AM, Frank Canova wrote:
But how heavy is NSLayoutManager?
They're not too heavy to create, but in my experience, they take too
long to deallocate.
It has a bunch of private objects so it's hard to judge from looking
at the header file. Would it be a problem handing out several dozen
of them?
That depends. Are you creating and retaining them, or are you creating
and then releasing them? If the former, then there should be no
problem. If the latter, then you either ought to use GC so you don't
hold up the main thread releasing them at once, or figure out how to
retain them (I ended up using NSTextStorage objects in the place of
NSAttributedString objects just so I could retain and reuse the layout
managers to lay out some attributed text).
Nick Zitzmann
<http://www.chronosnet.com/>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden