Permalink
Browse files

Makes object lifetime handling more crisp in JustRequest

Summary:
This fix is not strictly addressing a leak, but it does release memory more
aggressively which makes it easier to tack memory use in general

Test Plan: Ran sample

Reviewers: clang, mmarucheck, caabernathy

Reviewed By: clang

CC: gregschechte, ekoneil

Differential Revision: https://phabricator.fb.com/D497632

Task ID: 1011836
  • Loading branch information...
1 parent 81b5e99 commit 860caad578665fe15ad2372577d26274bc369646 @onebit onebit committed Jun 18, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 samples/JustRequestSample/JustRequestSample/JRViewController.m
@@ -155,9 +155,13 @@ - (void)requestCompleted:(FBRequestConnection *)connection
result:(id)result
error:(NSError *)error {
// not the completion we were looking for...
- if (connection != self.requestConnection) {
+ if (self.requestConnection &&
+ connection != self.requestConnection) {
return;
}
+
+ // clean this up, for posterity
+ self.requestConnection = nil;
if ([self.textOutput.text isEqualToString:loadingText]) {
self.textOutput.text = @"";

0 comments on commit 860caad

Please sign in to comment.