[LLVMbugs] [Bug 8185] New: Leaks in main()

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Sep 19 04:30:46 PDT 2010


           Summary: Leaks in main()
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Static Analyzer
        AssignedTo: kremenek at apple.com
        ReportedBy: csdavec at swan.ac.uk
                CC: llvmbugs at cs.uiuc.edu

It is fairly common not to bother explicitly freeing objects just before a
return statement in main(), as the kernel will reclaim the memory immediately
afterwards.  It's somewhat misleading to categorise things as leaks when they
occur in the program's main() function.  The analyser encourages you to
explicitly -release Objective-C objects just before exiting the program, which
can cause thousands of -dealloc methods to be called, doing nothing other than
delaying the program's exit.

Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

More information about the llvm-bugs mailing list