0
我有一個方法,像這樣:我是否需要釋放UITouch對象?
-(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];
}
我需要釋放無論是UITouch或CGPoint,以防止任何泄漏?
謝謝!
[內存管理規則](http://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmRules.html#//apple_ref/doc/uid/20000994-SW1)簡單而全面。 – outis 2011-12-17 22:13:36