Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7969665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:16:22+00:00 2026-06-04T07:16:22+00:00

Should the static analyzer provided by Xcode 4.3 catch or flag ivars that are

  • 0

Should the static analyzer provided by Xcode 4.3 catch or flag ivars that are not de-allocated?

I’m relatively new to iOS development and I’m looking for some enligthenment: My team builds our project with static analysis enabled for debug builds in XCode. To evaluate AppCode’s inspection feature, I performed an inspection on the entire project.

While I expected AppCode’s inspection to be good, I did not expect that it would find 50+ instances of ivars that were not being de-allocated correctly because we have static analysis turned on in Xcode. We verified that AppCode had correctly identified the issue, in a couple cases this resolved known memory leaks.

Should the clang static analyzer have caught these?

I’m hoping its because some project settings haven’t been correctly set. As I’d expect the clang static analyzer to at least flag missing de-allocations.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:16:22+00:00Added an answer on June 4, 2026 at 7:16 am

    Got the answer from the clang mailing list and clang can catch this issue. The problem is that the version of clang that ships with XCode has this feature disabled!

    Hello, Seamus. Clang does have support for this check, but it’s
    disabled by default (possibly because of
    http://llvm.org/bugs/show_bug.cgi?id=8838 ).

    I agree that Instruments would identify a leak or leaks, and in fact it had. However the process of narrowing down the source of a leak or, more likely, leaks is rarely easy in my experience. The issues AppCode flagged ended up resolving two known leaks the team couldn’t narrow down. Additionally it revealed many others that were part of the known issues and others that were unknown.

    Once clang is updated it should also nail these kinds of issues.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Should a static class/method/property be used in a unit test development environment, given that
I heard that static methods should use only static variables in java. But, main
In Java, static final variables are constants and the convention is that they should
With the latest releases of XCode that contain static analyzers, some of my objects
The readme included with the new Xcode 3.2.1 this week says the following: Static
I think this code should be fine but Static Analyzer doesn't like it. I
Just a simple question: I have read that a class should be made static
I have a very simple yes no question: should static methods have same result
How often should I use static methods generally? If I have like: Class1 _class34
I need to mock a GrailsControllerClass interface. Instance should have a static variable defined.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.