Re: Lifetime of an NSURLHandle
Re: Lifetime of an NSURLHandle
- Subject: Re: Lifetime of an NSURLHandle
- From: Jonathan Wight <email@hidden>
- Date: Wed, 19 May 2004 15:54:10 -0400
I've created a quick example project showing the 'bug'. Go to
http://homepage.mac.com/jwight and download DownloadBugTest.tgz - it
should download the Apple.com homepage (although it doesn't save it
anywhere) and crash after 5 seconds (if the download takes longer than
5 seconds then you can set the constant in main.m).
It also seems to show that - URLHandle:resourceDidBecomeAvailable:
never gets called!
Jon.
On May 19, 2004, at 13:55, Jonathan Wight wrote:
>
I have an NSURLHandle that seems to be releasing itself when the
>
download is complete. Is this expected behavior for the class?
>
>
I have a controller that manages the download of a large file,
>
presenting a progress dialog and so on. That object is passed a URL
>
(which I retain). By using the URL's URLHandleUsingCache method I get a
>
NSURLHandle (again I retain). At some point after the background
>
download is complete I release the controller object, which then
>
releases the URL and the NSURLHandle, unfortunately when the
>
NSURLHandle is released I get told that I'm trying to send a message to
>
a dealloc-ed object.
>
>
Who is releasing the NSURLHandle for me? I've found nothing in the
>
NSURLHandle documentation that tells me to treat it as a special
>
object...
>
>
Jon.
[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.