From ecaf57e6cebe85a818dc2b528ce4d6420f0073f6 Mon Sep 17 00:00:00 2001 From: rfm Date: Fri, 2 Mar 2012 09:09:15 +0000 Subject: [PATCH] add some comments git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@34862 72102866-910b-0410-8b05-ffd578937521 --- Headers/Foundation/NSURLConnection.h | 4 +++- Source/NSURLConnection.m | 7 ++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Headers/Foundation/NSURLConnection.h b/Headers/Foundation/NSURLConnection.h index dab5b716a..35bc816f9 100644 --- a/Headers/Foundation/NSURLConnection.h +++ b/Headers/Foundation/NSURLConnection.h @@ -80,7 +80,9 @@ extern "C" { * method, so the thread must run its current run loop * (in NSDefaultRunLoopMode) for processing to continue/complete.
* The delegate will receive callbacks informing it of the progress - * of the load. + * of the load.
+ * This method breaks with convention and retains the delegate object, + * releasing it when the connection finished loading, fails, or is cancelled. */ - (id) initWithRequest: (NSURLRequest *)request delegate: (id)delegate; diff --git a/Source/NSURLConnection.m b/Source/NSURLConnection.m index 6bf0d7cae..697dc1f11 100644 --- a/Source/NSURLConnection.m +++ b/Source/NSURLConnection.m @@ -218,9 +218,10 @@ typedef struct } } - /* According to bug #35686, Cocoa has a bizarre deviation from the convention - * that delegates are not retained here. For compatibility we retain the - * delegate and release it aggain when the operation is over. + /* According to bug #35686, Cocoa has a bizarre deviation from the + * convention that delegates are not retained here. + * For compatibility we retain the delegate and release it again + * when the operation is over. */ this->_delegate = [delegate retain]; this->_protocol = [[NSURLProtocol alloc]