Re: NSDatePicker leaking in graphical mode?
Re: NSDatePicker leaking in graphical mode?
- Subject: Re: NSDatePicker leaking in graphical mode?
- From: Oliver Quas <email@hidden>
- Date: Sun, 16 Jul 2006 18:07:37 +0200
Hi Jim,
thank you for answering that quick! I will take care of the memory
management and the casting. thanks!
I can reproduce this bug several times. I also created a test-project
from scratch - same issue here.
I will file this bug to Apple. Hopefully they will fix it fast.
Best regards,
Oliver
Am 16.07.2006 um 17:34 schrieb Jim Correia:
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
_______________________________________________
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