下面是代碼:我應該用這種方法釋放對象嗎?
- (id)copyWithZone:(NSZone*)zone {
ExecutedOrderInfo* copy = [[self class] allocWithZone:zone];
copy.executedPrice = self.executedPrice;
copy.executedQuantity = self.executedQuantity;
return (id)copy;
}
的問題是,是否有必要在上面的代碼發佈「複製」?或者當有人叫它時釋放它?
謝謝Max,這對我很有幫助。也感謝您使用簡單的英文.. – YAMEDE 2010-08-31 01:27:00