• 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: Analyser reports memory leak… where?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Analyser reports memory leak… where?


  • Subject: Re: Analyser reports memory leak… where?
  • From: Graham Cox <email@hidden>
  • Date: Thu, 12 Sep 2013 17:11:31 +0200

On 12/09/2013, at 5:00 PM, Bill Cheeseman <email@hidden> wrote:

> Fix the name and the Analyzer is happy. No need to change the code, because the code is correct

Except that 'fixing' the name would make the code incorrect, because then it isn't a valid getter name.

If you did go ahead and name it thus, the caller would assume that it's their job to release the returned value. If they did that, it would leave mEventTypes dangling, and a later call to -release in -dealloc would crash due to an overrelease. So renaming the method is wrong on both counts.

--Graham


_______________________________________________

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: Analyser reports memory leak… where?
      • From: Bill Cheeseman <email@hidden>
References: 
 >Fwd: Analyser reports memory leak… where? (From: Bill Cheeseman <email@hidden>)
 >Re: Analyser reports memory leak… where? (From: Roland King <email@hidden>)
 >Re: Analyser reports memory leak… where? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Arraycontroller and CoreData
  • Next by Date: Re: Analyser reports memory leak… where?
  • Previous by thread: Re: Analyser reports memory leak… where?
  • Next by thread: Re: Analyser reports memory leak… where?
  • Index(es):
    • Date
    • Thread