• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
holding NSMutables in non-mutable instances
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: holding NSMutables in non-mutable instances
      • From: Greg Titus <email@hidden>
References: 
 >NSFormatter & NSFormatter in IB (From: Jeff LaMarche <email@hidden>)

  • Prev by Date: Re: Finder-like icon browser
  • Next by Date: NSAlertPanel.beginAlertSheet changes
  • Previous by thread: NSFormatter & NSFormatter in IB
  • Next by thread: Re: holding NSMutables in non-mutable instances
  • Index(es):
    • Date
    • Thread