• 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
Why I have a leak? I am unable to understand
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why I have a leak? I am unable to understand


  • Subject: Why I have a leak? I am unable to understand
  • From: Agha Khan <email@hidden>
  • Date: Mon, 24 Aug 2009 17:20:10 -0700

HI:

I know the leak is in next 2 lines
I have commented all the code except these 2 lines.

// NSTimeInterval
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
unsigned unitFlags = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit;
NSDateComponents *dateSegments = [gregorian components:unitFlags fromDate:[NSDate date]];


I am not releasing gregorian, because I never used retain.
Same is true with dateSegments.

Can someone help me.

Why I have a leak? I am unable to understand?

Thanks in advance.

Agha
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why I have a leak? I am unable to understand
      • From: "Hank Heijink (Mailinglists)" <email@hidden>
    • Re: Why I have a leak? I am unable to understand
      • From: Nathan Vander Wilt <email@hidden>
    • Re: Why I have a leak? I am unable to understand
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: [iphone] Rotating UIViews?
  • Next by Date: NSTableView and programmatic changing of contextual menu
  • Previous by thread: [iphone] Rotating UIViews?
  • Next by thread: Re: Why I have a leak? I am unable to understand
  • Index(es):
    • Date
    • Thread