• 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: Why shouldn't I release?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why shouldn't I release?


  • Subject: Re: Why shouldn't I release?
  • From: "stephen joseph butler" <email@hidden>
  • Date: Fri, 30 Nov 2007 21:28:33 -0600

On Nov 30, 2007 8:54 PM, Ric L. <email@hidden> wrote:
> This doesn't make any sense to me. By my reckoning, stringWithFormat should create a string with a retain count of 1. 'fLetterCountField setStringValue' should assign the string to the field and the field should retain the string. I should then be free to release it.

The general rule of thumb is that "release" balances "alloc", "copy",
or "mutableCopy" (I think I'm forgetting one here). You didn't call
any of those methods above, so you shouldn't call "release".
_______________________________________________

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: 
 >Why shouldn't I release? (From: Ric L. <email@hidden>)

  • Prev by Date: Re: Why shouldn't I release?
  • Next by Date: Re: Why shouldn't I release?
  • Previous by thread: Re: Why shouldn't I release?
  • Next by thread: NSTextField suppressing multi line input
  • Index(es):
    • Date
    • Thread