Re: [問題] 關於retain
There should be no reason to explicitly ask an object what its retain count
is (see retainCount). The result is often misleading, as you may be unaware
of what framework objects have retained an object in which you are
interested. In debugging memory management issues, you should be concerned
only with ensuring that your code adheres to the ownership rules.
http://0rz.tw/pXLIb
請拉到最下面
這篇也可以看看
http://stackoverflow.com/questions/8863269/how-do-i-verify-reference-count-in-arc-mode
※ 引述《santaclub (聖誕青年)》之銘言:
: 各位好
: 最近又遇到一個困難...
: 一個該死的property一直沒有被刪除 縱使看起來應該是沒有retain count了
: 現在只知道 (CFGetRetainCount((__bridge CFTypeRef) something)
: 可以讀到something 的retain count,
: 請問有沒有辦法可以看他的retain count到底是誰給的?
: 有請高人指點 ....感恩
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 111.240.130.108
※ 編輯: whitefur 來自: 111.240.130.108 (01/16 20:21)
推
01/18 15:22, , 1F
01/18 15:22, 1F
→
01/18 22:15, , 2F
01/18 22:15, 2F
→
01/18 22:16, , 3F
01/18 22:16, 3F
→
01/18 22:17, , 4F
01/18 22:17, 4F
討論串 (同標題文章)
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章