Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-17 Thread Matt Neuburg
On Fri, 13 Aug 2010 13:38:59 -0400, Michael Ash said: >On Thu, Aug 12, 2010 at 10:51 PM, yanghb wrote: >> if the instance is released in delegate, what to perform the following >> code?OK, maybe code segment will always be there, but if the code >> access some instance vairable, it just will caus

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-13 Thread Michael Ash
On Thu, Aug 12, 2010 at 10:51 PM, yanghb wrote: > if the instance is released in delegate, what to perform the following > code?OK, maybe code segment will always be there, but if the code > access some instance vairable, it just will cause EXEC_ACCESS_BAD, > isn't it? This is absolutely correct.

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-13 Thread yanghb
In my self-defined network handler function, I use a instance variable "connection" to hold NSURLConnection alloced instance, when I will use to load request, so the instance variable can be canceled some where. and the instance will be released before next request performs. that is, if(connection

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-13 Thread Conrad Shultz
On Aug 12, 2010, at 11:06, Keary Suska wrote: > If you really don't want (or can't have) an instance variable, you can > init/alloc then release in connectionDidFinishLoading: and > connection:didFailWithError:. I wouldn't recommend this though, as it is > probably "bad form", but as long you

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-12 Thread Keary Suska
On Aug 12, 2010, at 1:41 PM, Conrad Shultz wrote: > On Aug 12, 2010, at 11:06, Keary Suska wrote: > >> If you really don't want (or can't have) an instance variable, you can >> init/alloc then release in connectionDidFinishLoading: and >> connection:didFailWithError:. I wouldn't recommend this

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-12 Thread Keary Suska
On Aug 12, 2010, at 12:26 AM, Hunje Cho wrote: > Hello, > > I'm just wondering whether autoreleased NSURLConnection object can > finish its job before released. Like below codes. > > // connect to http server for downloading a large file > NSURLConnection* con = [NSURLConnection connectionWithRe

Does autoreleased NSURLConnection object guarantee job completion?

2010-08-12 Thread Hunje Cho
Hello, I'm just wondering whether autoreleased NSURLConnection object can finish its job before released. Like below codes. // connect to http server for downloading a large file NSURLConnection* con = [NSURLConnection connectionWithRequest:request delegate:self]; // con is not saved as property