• 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: (void *)contextInfo
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (void *)contextInfo


  • Subject: Re: (void *)contextInfo
  • From: "Sean McBride" <email@hidden>
  • Date: Tue, 12 Jan 2010 15:25:41 -0500
  • Organization: Rogue Research Inc.

On 1/12/10 3:04 PM, Sherm Pendley said:

>Additionally, I'd recommend making theContextInfo into an instance
>variable, rather than passing it through the contextInfo. You can then
>write (or @synthesize) an accessor method that encapsulates all of the
>relevant memory management into one place, which is *far* less
>error-prone than scattering -retain and -release calls all over the
>place.

Additionally, with GC, one must be very careful passing Obj-C objects
through void* pointers. See "Managing Opaque Pointers" here:

<http://developer.apple.com/mac/library/documentation/cocoa/conceptual/
GarbageCollection/Articles/gcUsing.html>

If you can require 10.6, I believe the new block APIs make the memory
management simpler (haven't tried myself).

--
____________________________________________________________
Sean McBride, B. Eng                 email@hidden
Rogue Research                        www.rogue-research.com
Mac Software Developer              Montréal, Québec, Canada


_______________________________________________

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

References: 
 >(void *)contextInfo (From: Rainer Standke <email@hidden>)
 >Re: (void *)contextInfo (From: Sherm Pendley <email@hidden>)

  • Prev by Date: Re: (void *)contextInfo
  • Next by Date: how do you set the value of a UIPickerView programatically? [solved]
  • Previous by thread: Re: (void *)contextInfo
  • Next by thread: Re: (void *)contextInfo
  • Index(es):
    • Date
    • Thread