tags:

views:

179

answers:

1

I am creating an NSArray inside a method, so I have to give it up with release when I'm done with it. I pass this array to the

- (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay

method. After that, I don't need the array anymore in my method that calls this performSelector:withObject:afterDelay:.

The documentaton doesn't say if anArgument is going to be retained, so I wonder if I had to autorelease it or retain it in order to stay alive. What do you think?

+4  A: 

The performSelector methods retain their receiver and argument.

Nick Veys