NSURLConnection not removing itself from the RunLoop ?
NSURLConnection not removing itself from the RunLoop ?
- Subject: NSURLConnection not removing itself from the RunLoop ?
- From: Thomas Deniau <email@hidden>
- Date: Wed, 9 Jul 2003 11:41:11 -0400
Hi !
In a separate thread, I create a NSURLConnection and then run the run
loop :
NSLog(@"Running run loop");
[[NSRunLoop currentRunLoop] run];
NSLog(@"Run loop exiting");
The problem is that the run loop never exits even when my connection
has sent me the connectionDidFinishLoading: message.
So i tried to do a [connection cancel] anyway, but the run loop doesn't
exit either.
Indeed, when I try to log the run loop (after having cancelled the
connection, or even after having RELEASED it), I get
<CFRunLoop 0x4a616d0 [0xa01303fc]>
[......]
sources = <CFSet 0x4a63e20 [0xa01303fc]>{count = 1, capacity = 11,
values = (
0 : <CFRunLoopSource 0x4a63d30 [0xa01303fc]>{locked = No, valid = Yes,
order = 0, context = <CFRunLoopSource context 0x4a61690>}
[......]
When I log the run loop in connection:didReceiveData: (that is, when
the connection isn't finished yet) I get the same sources.
So that means that the connection doesn't remove itself from the run
loop's sources... even when it's cancelled or released.
How can I force the connection to clean up the run loop's sources ?
Thanks in advance,
--
Thomas Deniau
_______________________________________________
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.