• 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: Autorelease question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Autorelease question


  • Subject: Re: Autorelease question
  • From: Dmitry Markman <email@hidden>
  • Date: Thu, 3 Apr 2008 21:54:00 -0400

Just addition to the previous email

On Apr 3, 2008, at 9:45 PM, Dmitry Markman wrote:


[stringAttributes release]; [font release]; [cocoaColor release]; [context release]; [textString release]; [nsFontName release]; [pool release];



if I comment all those releases (excerpt [pool release])
then application won't crash

that probably means that some of the objects
(stringAttributes, font, cocoaColor, context, textString or nsFontName)
were already in the pool and I shouldn't release them
also if I call retain for every above object and call release the everything will be fine with [pool release]
but why should I retain them if I have no intention to share them?




thanks


Dmitry Markman

_______________________________________________

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


  • Follow-Ups:
    • Re: Autorelease question
      • From: Rob Keniger <email@hidden>
References: 
 >Autorelease question (From: Dmitry Markman <email@hidden>)
 >Re: Autorelease question (From: Robert Claeson <email@hidden>)
 >Re: Autorelease question (From: Jens Alfke <email@hidden>)
 >Re: Autorelease question (From: Dmitry Markman <email@hidden>)

  • Prev by Date: Re: Autorelease question
  • Next by Date: Re: NSCondition easter-egg hunt
  • Previous by thread: Re: Autorelease question
  • Next by thread: Re: Autorelease question
  • Index(es):
    • Date
    • Thread