Please sign in to comment.
iOS SDK: fix memory issue in SDK and theRunAround demo App
summary: Fix some memory leak and dealloc issues The Facebook.m -logout: method calls this: [self requestWithMethodName:@"auth.expireSession" andParams:params andHttpMethod:@"GET" andDelegate:self]; By setting the Facebook object as the delegate, it gets retained by the FBRequest object, but in turn the -openUrl:params:httpMethod:delegate: method retains the request itself in the _request instance variable. This creates a retain cycle, and neither object will be freed. -in Session.m, there is a missing retain on the uid in -restore -in Session.m there is no dealloc method — one should be added to free facebook and uid -in UserInfo.m, the dealloc needs to release the userInfoDelegate that was retained -in UserRequestResult.m there is no dealloc — one should be added to free userRequestDelegate test plan: theRunAroundDemoApp, open the app login and turn off the app without log out. bring the app up again. make sure we are logged in and all the session info bring back correctly. Run the unittest
- Loading branch information...
Showing with 16 additions and 14 deletions.