• 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: Context in GCD source cancel handler?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Context in GCD source cancel handler?


  • Subject: Re: Context in GCD source cancel handler?
  • From: Dave Keck <email@hidden>
  • Date: Wed, 5 Jan 2011 15:41:11 -0500

> Q: When a context object is set with dispatch_set_context(), is it retained? Or do I need to retain it first, set it, and then in the cancel handler release it?

The 'context' argument is not retained. You can infer this primarily
by the declaration of dispatch_set_context(), and also the mention
that 'context' is "client defined" in dispatch/object.h; since the
'context' argument is an untyped pointer (void *),
dispatch_set_context() cannot assume anything about the supplied
'context' argument, much less that it's a valid libdispatch object.
_______________________________________________

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: Context in GCD source cancel handler?
      • From: Jonathon Kuo <email@hidden>
References: 
 >Context in GCD source cancel handler? (From: Jonathon Kuo <email@hidden>)
 >Re: Context in GCD source cancel handler? (From: Dave Zarzycki <email@hidden>)
 >Re: Context in GCD source cancel handler? (From: Jonathon Kuo <email@hidden>)

  • Prev by Date: Re: NSCollectionView start dragging immediately
  • Next by Date: Re: [Solved] Re: When adding Cocoa classes I get a lot of compile errors automatically
  • Previous by thread: Re: Context in GCD source cancel handler?
  • Next by thread: Re: Context in GCD source cancel handler?
  • Index(es):
    • Date
    • Thread