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.
精彩评论