Instance Method


If the receiver hasn’t already done so, retains the target and all object arguments of the receiver and copies all of its C-string arguments and blocks. If a returnvalue has been set, this is also retained or copied.


- (void)retainArguments;


Before this method is invoked, argumentsRetained returns NO; after, it returns YES.

For efficiency, newly created NSInvocation objects don’t retain or copy their arguments, nor do they retain their targets, copy C strings, or copy any associated blocks. You should instruct an NSInvocation object to retain its arguments if you intend to cache it, because the arguments may otherwise be released before the invocation is invoked. NSTimer objects always instruct their invocations to retain their arguments, for example, because there’s usually a delay before a timer fires.

See Also

Configuring an Invocation Object


The receiver’s selector, or 0 if it hasn’t been set.


The receiver’s target, or nil if the receiver has no target.

- setArgument:atIndex:

Sets an argument of the receiver.

- getArgument:atIndex:

Returns by indirection the receiver's argument at a specified index.


YES if the receiver has retained its arguments, NO otherwise.

- setReturnValue:

Sets the receiver’s return value.

- getReturnValue:

Gets the receiver's return value.