Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
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...
commit 860caad578665fe15ad2372577d26274bc369646 1 parent 81b5e99
@onebit onebit authored
View
6 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 = @"";
Please sign in to comment.
Something went wrong with that request. Please try again.