> On Apr 13, 2015, at 12:11 PM, Raglan T. Tiger <r...@crusaderrabbit.net> wrote:
> 
> Just a quick follow-up and thanks to those that put me on the right path.
> 
> I ran the code in GDB on a 10.6.8 machine and set NSZombieEnabled=YES.  This 
> showed me the object that was released that Cocoa was calling 
> tableView:objectValueForTableColumn:row: on after release.  This was only a 
> problem on 10.6.8 machines.
> 
> The solution was to set the datasource and delegate to nil on the table 
> before exiting the stack that started the process.
> 
> This does seem to be a bug when building with Xcode 6.2 and 10.9 SDK.

The bug is in your code. It has always been a requirement that you nil out any 
delegate and datasource backpointers before the thing they point to gets 
deallocated. You just happened to get away with it due to some aspect of older 
Xcode versions’ codegen.

This was a large motivation behind Zeroing Weak References (aka __weak in ARC).

--Kyle Sluder
_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to