• 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: Debugging memory leak in NSURLSession with ARC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging memory leak in NSURLSession with ARC


  • Subject: Re: Debugging memory leak in NSURLSession with ARC
  • From: Graham Cox <email@hidden>
  • Date: Fri, 02 Jan 2015 13:26:41 +1100

> On 2 Jan 2015, at 12:48 pm, Quincey Morris <email@hidden> wrote:
>
> **** That usually means the block and the ‘self’ it captured mutually refer to each other. I’m betting this is what’s wrong in your case.
>
>


Quincey, thanks for your lengthy and well-thought-out reply (as usual) :)

I think you've hit the nail straight on the head (as usual), with the block/self problem. It's one I knew about before, but had forgotten again in my excitement at getting the code running. The question is what to do about it.

My handler block refers to 'self' quite extensively - it calls other methods of self and also refers to properties such as self.delegate. I'm not quite sure how I can rework it not to refer to self. Maybe I just need to not use the completion block approach and use a delegate callback instead. I need to go away and think about this... thanks for the slap about the head.

--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: Debugging memory leak in NSURLSession with ARC
      • From: Joar Wingfors <email@hidden>
    • Re: Debugging memory leak in NSURLSession with ARC
      • From: Roland King <email@hidden>
References: 
 >Debugging memory leak in NSURLSession with ARC (From: Graham Cox <email@hidden>)
 >Re: Debugging memory leak in NSURLSession with ARC (From: David Duncan <email@hidden>)
 >Re: Debugging memory leak in NSURLSession with ARC (From: Graham Cox <email@hidden>)
 >Re: Debugging memory leak in NSURLSession with ARC (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Debugging memory leak in NSURLSession with ARC
  • Next by Date: Re: Debugging memory leak in NSURLSession with ARC
  • Previous by thread: Re: Debugging memory leak in NSURLSession with ARC
  • Next by thread: Re: Debugging memory leak in NSURLSession with ARC
  • Index(es):
    • Date
    • Thread