• 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: 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
References: 
 >NSDatePicker leaking in graphical mode? (From: Oliver Quas <email@hidden>)
 >Re: NSDatePicker leaking in graphical mode? (From: Jim Correia <email@hidden>)

  • Prev by Date: Re: NSPipe / NSTask ls -> Array
  • Next by Date: Re: Key Value coding with Slider vs TextField
  • Previous by thread: Re: NSDatePicker leaking in graphical mode?
  • Next by thread: Re: NSDatePicker leaking in graphical mode?
  • Index(es):
    • Date
    • Thread