[llvm-bugs] [Bug 28746] New: Clang Memory Leak False Negative about class UIAlertView

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 27 18:39:44 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=28746

            Bug ID: 28746
           Summary: Clang Memory Leak False Negative about class
                    UIAlertView
           Product: clang
           Version: 3.8
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Static Analyzer
          Assignee: kremenek at apple.com
          Reporter: qinfenxiang at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

#import <UIKit/UIAlertView.h>

@implementation UIAlertViewLeakTest

- (void) leakTest{

    UIAlertView *alert = [[UIAlertView alloc]initWithTitle:nil
message:@"Q_Wi-Fi已断开,是否继续使用2G/3G/4G网络下载视频?" delegate:self
cancelButtonTitle:@"Q_No" otherButtonTitles:@"Q_Yes",nil, nil];  // retain
count is +1 and not release

    UIAlertView *tmp = alert;

}

The UIAlertView instance with reatian count +1 not release ,BUT clang couldn't
check out and tell me . 

Can anyone help and give a reason?

Looking forward to the answer and Appreciate it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160728/c96f0c0f/attachment.html>


More information about the llvm-bugs mailing list