开发者

Releasing connection in connectionDidFinishLoading cause bad instruction

开发者 https://www.devze.com 2023-01-07 02:41 出处:网络
According to URL Loading System Programming Guide NSConnection sample code I can release connection in connectionDidFailWithError and connectionDidFinishLoading.

According to URL Loading System Programming Guide NSConnection sample code I can release connection in connectionDidFailWithError and connectionDidFinishLoading.

However, releasing connection in conn开发者_高级运维ectionDidFinishLoading causing

objc[19685]: FREED(id): message releaseDelegate sent to freed object=0x3b41630
Program received signal:  “EXC_BAD_INSTRUCTION”.

Why?


If you doesn't retain the object you receive from [NSConnection connectionWithRequest:] then you must not call release on it.


This is a double release error. It means either you didn't retain an object enough times, or you sent it too many release messages.

0

精彩评论

暂无评论...
验证码 换一张
取 消