• 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: NSDatePicker leaking in graphical mode?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSDatePicker leaking in graphical mode?


  • Subject: Re: NSDatePicker leaking in graphical mode?
  • From: Jim Correia <email@hidden>
  • Date: Sun, 16 Jul 2006 11:34:13 -0400

Oliver,

I have no specific knowledge about the leaks problem. If you have a reproducible case, your best bet is to file a bug.

However, a couple of points about your sample code:

On Jul 16, 2006, at 11:18 AM, Oliver Quas wrote:

when i programmatically set

[myDatePicker setCalendar:[[NSCalendar currentCalendar] autorelease]];

The result of +[NSCalendar currentCalendar] should not be released.

https://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/ Tasks/MemoryManagementRules.html

[myDatePicker setDate:(NSDate *)[NSCalendarDate calendarDate]];

NSCalendarDate is a subclass of NSDate, so this cast is unnecessary. (If you find that it is necessary to cast from a specific Obj-C type to another, something is probably wrong with your code and/or design.)


Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSDatePicker leaking in graphical mode?
      • From: Oliver Quas <email@hidden>
References: 
 >NSDatePicker leaking in graphical mode? (From: Oliver Quas <email@hidden>)

  • Prev by Date: NSDatePicker leaking in graphical mode?
  • Next by Date: NSTreeOutline display glitches; how to troubleshoot?
  • Previous by thread: NSDatePicker leaking in graphical mode?
  • Next by thread: Re: NSDatePicker leaking in graphical mode?
  • Index(es):
    • Date
    • Thread