Re: [問題] 問個GCD的問題
不太了解z大的提問, 因為我是這幾天才開始研究block + gcd
這個例子,大概就是 A push B, 在B的ViewDidLoad 執行:
dispatch_async(myQ, ^{
for(int i=0;i<=100000;i++)
{
Dog *myDog = [[Dog alloc]init];
[myDog bark];
[myDog release];
}
});
當for 還沒跑完, B pop 回A, 這樣會有問題嗎?
※ 引述《shinrenpan (好無聊,丟個水球來吧)》之銘言:
: 在UINavigationController 模式下
: A push B
: 在B用GCD跑了一個queue
: 這個queue可能會alloc object
: 當B的GCD還沒跑完
: B pop回 A
: 這樣會有momory leak的問題嗎?
: 如果有, 要怎解決呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.130.135.25
推
07/27 08:36, , 1F
07/27 08:36, 1F
→
07/27 12:41, , 2F
07/27 12:41, 2F
討論串 (同標題文章)
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章