Given this code:
NSHTTPCookieStorage *cookieStorage = [NSHTTPCookieStorage sharedHTTPCookieStorage];
for (NSHTTPCookie *cookie in cookieStorage.cookies) {
if (/* my specific condition that is true multiple times */) {
[cookieStorage deleteCookie:cookie];
}
}
This does not throw an exception, implying that the mutation of the cookie jar during the enumeration is safe. What I want to know is, why? Is this always going to be safe, or does it just happen to be safe due to some implementation detail that may change?