On 03/03/2013, at 11:05 AM, Quincey Morris 
<quinceymor...@rivergatesoftware.com> wrote:

> The other gotcha is that NSInvocation doesn't take ownership of any objects 
> referred to by its arguments. That means being very careful when using ARC, 
> since it can't memory-manage them for you.


Unless you send -retainArguments to it, in which case it, well, does what it 
says on the tin.

What's a bit annoying is that this retains the target as well, so if you want 
arguments retained but not the target (e.g. in an Undo scenario), you have to 
do a bit of a dance to workaround it.

--Graham


_______________________________________________

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