holding NSMutables in non-mutable instances
holding NSMutables in non-mutable instances
- Subject: holding NSMutables in non-mutable instances
- From: John Timmer <email@hidden>
- Date: Fri, 12 Oct 2001 15:52:26 -0400
A quick technical question:
My understanding is that NSMutable class instances carry a bit of overhead
in terms of memory and processing time due to their added flexibility, so
that if you're going to finalize a bunch of them, it's worth converting them
to an unmutable form.
Given that, the question: if I pass an NSMutable to another NSMutable, then
convert the second one to a non-mutable, does that convert the first to a
non-mutable? A concrete example: I stuff an NSMutableDictionary into an
NSMutableAttributedString, then convert that to an NSAttributedString. Is
there still some cost associated with the dictionary, or is it automagically
converted for me?
An alternate question: Am I thinking too much about this?
Any advice would be appreciated,
Jay