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 328601
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T09:30:37+00:00 2026-05-12T09:30:37+00:00

When working on complex problems, I find myself trying all sorts of solutions and,

  • 0

When working on complex problems, I find myself trying all sorts of solutions and, while doing my best to stay organized, the code can get quite messy. Objects may be changed and no longer be of use, while other times I may add snippets of code that do not end up being used by the program but are taking up space and possibly memory.

Aside from carefully reading through the program, are there ways of finding chunks of code that are not used by the program?

What are some tips you have found for cleaning up your program?

One small trick I found for checking that objects from the .h file are still used in the app and to check that they are properly deallocated/released is to use the “search all” function (cmd-shift-F) and search by the name of the object

  • 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-05-12T09:30:38+00:00Added an answer on May 12, 2026 at 9:30 am

    Here’s an article about a few approaches to reporting code coverage in your application:

    http://seriot.ch/blog.php?article=20080728

    It’s oriented toward Mac applications but mostly applies to iPhone stuff too (DTrace you can only use in the simulator)

    As the article notes, this is a harder problem in objective-C than other languages since it’s so easy to have a method that is called by performSelector, that static analysis would report as dead code even though it gets called (yes you can also do something similar in Javabut it’s done far more rarely).

    Probably the gcc warning flag is the best idea, along with careful examination of what it thinks are uncalled methods. Actually running every possible code path in an application is actually pretty hard, but if you have a smaller set of possibly functions to remove at least you can make choices more quickly so you wouldn’t have to test every path…

    EDIT: I should probably make clear that code coverage is a technique you can use to find “dead” code, which is what you were after

    EDIT2 : Link is dead! I cannot find a cached version, and I can’t remember it well enough to summarize more about what it contained.

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

Sidebar

Related Questions

Working on a somewhat complex page for configuring customers at work. The setup is
I'm working on a fairly complex project, a custom encryption routine if you will
I recently started working on a large complex application, and I've just been assigned
I'm working with some schema which defines an abstract complex type, eg. <xs:complexType name=MyComplexType
I'm faced with writing a framework to simplify working with a large and complex
Working with dates in ruby and rails on windows, I'm having problems with pre-epoch
Working with a SqlCommand in C# I've created a query that contains a IN
Working on a project at the moment and we have to implement soft deletion
Working on a project that parses a log of events, and then updates a
Working with python interactively, it's sometimes necessary to display a result which is some

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.