• 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: Lee Ann Rucker <email@hidden>
  • Date: Thu, 12 Sep 2013 13:45:28 -0700

On Sep 12, 2013, at 9:57 AM, Bill Cheeseman wrote:

> As I recall, it stated that the "return [[x retain] autorelease]" pattern is preferred for getters and gave many reasons for preferring it.

Coincidentally enough, we've just hit a case where that's bad - it's a complicated situation with ObjC++ and C++ object lifetimes, resulting in an accessor that uses that pattern being called as a result of that object being in dealloc. By the time the autorelease pool pops the object it's trying to release is long gone. It's KVO unregistering, so there's not much we can do about it other than be smarter in our accessors.
_______________________________________________

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: Greg Parker <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>)
 >Re: Analyser reports memory leak… where? (From: Graham Cox <email@hidden>)
 >Re: Analyser reports memory leak… where? (From: Bill Cheeseman <email@hidden>)
 >Re: Analyser reports memory leak… where? (From: Graham Cox <email@hidden>)
 >Re: Analyser reports memory leak… where? (From: Bill Cheeseman <email@hidden>)

  • Prev by Date: Re: Analyser reports memory leak… where?
  • 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