• 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: Today is messed up
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Today is messed up


  • Subject: Re: Today is messed up
  • From: Jonathan Hendry <email@hidden>
  • Date: Sun, 10 Aug 2003 15:02:10 -0400

On Sunday, August 10, 2003, at 08:46 AM, Peter Fischer wrote:

Wesley -
In this example, you should never send today a release message because of the way that you are creating the today variable. Sending NSCalendarDate the calendarDate message returns a fully allocated & initialized NSCalendarDate* object.

I think you're missing the crucial part, which is that [NSCalendarDate date] returns an
_autoreleased_ instance, not just a "fully allocated & initialized" instance. The
important part is that it's already autoreleased.

Which is why it's going to go away without Wesley having to do anything, and
why he shouldn't call release on it.

- JH
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Today is messed up (From: Peter Fischer <email@hidden>)

  • Prev by Date: Question regarding menus and document based app.
  • Next by Date: Re: Scrolling Thumbnails (Like Preview)
  • Previous by thread: Re: Today is messed up
  • Next by thread: Re: Today is messed up
  • Index(es):
    • Date
    • Thread