On Jan 20, 2011, at 1:24 PM, Corbin Dunn wrote:

On Jan 19, 2011, at 4:51 PM, Lee Ann Rucker wrote:


On Jan 19, 2011, at 3:21 PM, Corbin Dunn wrote:


In general, it is good practice in your apps to set your delegate and 
datasource to nil. Who is to say something might cause a draw to happen, which 
would then message your (now dealloced) delegate? Ideally, NSTableView 
shouldn't message the delegate/datasource after the window is closed, but 
something extra "setNeedsDisplay" messages get thrown into it, causing it to 
happen, and crash. That is why your bug happened. 6728942 made an effort to 
reduce the display message.


If I'd set them in my code I would agree, but I expect that if it's set by the 
nib setup code then it should cleared by the nib cleanup code.

Yes, and it works in the majority of cases. It's the cases where the programmer 
does something extra (that causes a redisplay), and doesn't understand why it 
has side effects (redrawing, and subsequently delegate callbacks). There is no 
nib cleanup code; the nib doesn't have any way of zero-ing out references.

If you do have a case where you think AppKit should be cleaning it up, then 
please submit it to bugreporter.apple.com<http://bugreporter.apple.com/> -- it 
is possible that in some cases we may be able to make it work better.

Now that I dig, it was a Snow Leopard beta bug that got fixed before it 
shipped, so despite the similar fix/workaround this is a different issue. I 
miss the real Radar, where I could actually see the bug my bug was a duplicate 
of :)


_______________________________________________

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

Reply via email to