使用amazon sample ios app登录时内存泄漏

时间:2018-06-17 10:44:22

标签: ios objective-c xcode memory-leaks amazon

我正在遵循以下目标:在Objective-C中使用Amazon for iOS app登录进行集成。 Getting started document

现在我的应用程序只有一个视图控制器和一个单击时运行此代码的按钮:

- (IBAction)amznButtonClicked:(id)sender {
NSLog(@"amazon button clicked");

AMZNAuthorizeRequest *request = [[AMZNAuthorizeRequest alloc] init];
request.scopes = [NSArray arrayWithObject:
                  [AMZNProfileScope profile]];

[[AMZNAuthorizationManager sharedManager] authorize:request
    withHandler:^(AMZNAuthorizeResult *result, BOOL
                  userDidCancel, NSError *error) {
        if (error) {
            // Handle errors from the SDK or authorization server.
            NSLog(@"there was an error %s",[error.description UTF8String]);
        } else if (userDidCancel) {
            // Handle errors caused when user cancels login.
            NSLog(@"User cancelled");
        } else {
            // Authentication was successful.
            // Obtain the access token and user profile data.
            NSString *accessToken = result.token;
            AMZNUser *user = result.user;
            NSString *userID = user.userID;
            NSLog(@"Success");
        }
    }];

}

在xcode中查看内存图并运行内存泄漏仪器。 我看到内存泄漏。 这是否是可接受的泄漏数量?或者我的代码出了什么问题?或者LoginWithAmazon框架的已知问题?

enter image description here

enter image description here

0 个答案:

没有答案