Calling AFNetworking in NSTimer causes serious memory leak
问题 I'm trying to debug a difficult memory leak. In MyAppDelegate.m, I have - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.notificationTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(syncNotifications:) userInfo:nil repeats:YES]; return YES; } - (void)syncNotifications:(NSTimer*)timer { NSString *path = @"http://example"; NSLog(@"GET: %@", path); AFHTTPRequestOperationManager *network =