On Thu, Aug 12, 2010 at 10:51 PM, yanghb <sprh...@gmail.com> wrote:
> if the instance is released in delegate, what to perform the following
> code?OK, maybe code segment will always be there, but if the code
> access some instance vairable, it just will cause EXEC_ACCESS_BAD,
> isn't it?

This is absolutely correct. If you're going to release an object from
inside a delegate callback made by that object (which is *usually*
something you should avoid anyway), then use autorelease, rather than
release, to ensure that the object has a chance to finish its own code
before being destroyed.

Mike
_______________________________________________

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