Reputation: 2724
I have a method such as this:
-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{
//Use to animate drag
UITouch *touch = [touches anyObject];
CGPoint currentLocation = [touch locationInView:self];
[self colorDragedOver:currentLocation];
[touch release];
}
Do I need to release either the UITouch or the CGPoint to prevent any leaks?
Thanks!
Upvotes: 0
Views: 438
Reputation: 10065
No. You never alloc/init
or copy
the touch so it is considered autoreleased.
CGPoint
isn't an object or a reference so should never be released or autoreleased.
Upvotes: 2