From f184e9fa34fa43e62befaa879ec46b6937b1217e Mon Sep 17 00:00:00 2001 From: Ash Furrow Date: Tue, 22 Oct 2013 20:29:02 -0400 Subject: [PATCH] Broke reference cycle in FRPLoginViewModel. --- FRP/FRPLoginViewModel.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/FRP/FRPLoginViewModel.m b/FRP/FRPLoginViewModel.m index ef6a6ba..6ba97de 100644 --- a/FRP/FRPLoginViewModel.m +++ b/FRP/FRPLoginViewModel.m @@ -21,9 +21,11 @@ self = [super init]; if (!self) return nil; + @weakify(self); self.loginCommand = [[RACCommand alloc] initWithEnabled:[RACSignal combineLatest:@[RACObserve(self, username), RACObserve(self, password)] reduce:^id(NSString *username, NSString *password){ return @(username.length > 0 && password.length > 0); }] signalBlock:^RACSignal *(id input) { + @strongify(self); return [FRPPhotoImporter logInWithUsername:self.username password:self.password]; }];