• 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
Re: Performance, Efficiency - Coding practice
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance, Efficiency - Coding practice


  • Subject: Re: Performance, Efficiency - Coding practice
  • From: Michael Ash <email@hidden>
  • Date: Thu, 28 May 2009 23:23:22 -0400

On Thu, May 28, 2009 at 8:57 PM, Roland King <email@hidden> wrote:
>>
>> So if i have:
>>
>> NSMutableString *title = [[NSString alloc] init];
>> [title setString: @"test"];
>>
>> That would be correct and safe?
>
> No. I hope it would emit warnings on compilation too.

No warning will be emitted. -init is declared to return id.

Mike
_______________________________________________

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

References: 
 >Performance, Efficiency - Coding practice (From: John Ku <email@hidden>)
 >Re: Performance, Efficiency - Coding practice (From: Kyle Sluder <email@hidden>)
 >Re: Performance, Efficiency - Coding practice (From: John Ku <email@hidden>)
 >Re: Performance, Efficiency - Coding practice (From: Roland King <email@hidden>)

  • Prev by Date: Re: NSNotificationCenter CPU usage problem
  • Next by Date: Re: Recommendations to Reading the Xcode in built Documentation to the fullest effect
  • Previous by thread: Re: Performance, Efficiency - Coding practice
  • Next by thread: Re: Performance, Efficiency - Coding practice
  • Index(es):
    • Date
    • Thread