AFNetworking/AFNetworking — pull request #1789 by petermeyers1 (2014-01-30 07:46:03+00:00)
Title: Replacing mutableTaskDelegatesKeyedByTaskIdentifier with an associative reference between task and delegate

Setting a AFURLSessionManagerTaskDelegate as an associated object on its NSURLSessionTask. This eliminates the need for the Session manager to keep track of the mapping from tasks to delegates with the mutableTaskDelegatesKeyedByTaskIdentifier dictionary. The delegate is associated by a strong, nonatomic reference. Strong because this will be the only reference to the delegate. Nonatomic because this value (the pointer to the delegate) is set just once and thus will never be read and written simultaneously.

Just a thought... always nice to eliminate the need for a lock.