Sign In/My Account | View Cart  

advertisement

AddThis Social Bookmark Button

Article:
  Mac OS X's Preferences System (and More!)
Subject:   Leap of faith?
Date:   2001-09-01 15:03:02
From:   TheBum
Mike,


In the "Loading Data" section of the article, you describe the whole bit about creating an NSString with a convenience constructor and then creating a second, tilde-expanded NSString with an instance method for the file name. Farther down the page where you add the error checking, that first NSString creation is all of a sudden replaced by an @"..." string. What's up with that?


BTW, great series of articles!! I look forward to each one.

Full Threads Oldest First

Showing messages 1 through 2 of 2.

  • Michael Beam photo Leap of faith?
    2001-09-01 15:22:00  Michael Beam | O'Reilly Author [View]

    Hey,

    That string being created statically using @"..." rather than the convenience constructor was probably just a slip-up when i was writing that part. In any event, either one works, they just work in different ways. Practically speaking, you're probably not increasing your performance/efficiency/whatever mush by using the convenience constructor, since its just one string. Its when you repeatedly create/destroy objects that you _really_ need to watch out for mem management issues. I did it that way just to point out another situation of how you can work memory management. Well, i'm off to see UT play New Mexico. I'm glad you're enjoying the columns!!

    Mike
    • Leap of faith?
      2001-09-01 19:07:43  TheBum [View]

      Thanks, Mike. Now I know that I just didn't miss something. Hook 'em Horns! (I'm a K-State grad, but I pull for Big 12 teams whenever they're not playing mine).