Re: NSDatePicker leaking in graphical mode?
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