1
考慮下面的代碼 - 顯然非ARC:系統是否在performSelector對象上執行保留操作:onThread:withObject:waitUntilDone:何時不等待?
.
.
.
NSString* someValueToSend= [NSString alloc] [email protected]"Send me! Will I survive?"];
if([delegate respondsToSelector:@selector(giveMeYourString:)])
{
[delegate performSelector:@selector(giveMeYourString:) onThread:someOtherThread withObject:someValueToSend waitUntilDone:NO];
}
[someValueToSend release];
.
.
.
根據什麼其他的應用程序是怎麼回事,委託可能會或可能不會得到周圍被釋放someValueToSend之前運行的選擇。這個「系統」是否對對象保留「禮貌」?
如果不是,並且我處於無法阻止的情況,那麼在沒有泄漏的情況下跨越邊界發送值的策略是什麼?自動釋放?
我發現別處的參考,所述對象被保留,但我還沒有看到該文檔中....
任何輸入理解。
感謝您的快速響應! – GTAE86