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 s...@rogue-research.com Rogue Research www.rogue-research.com Mac Software Developer Montréal, Québec, Canada _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com