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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T00:45:58+00:00 2026-05-16T00:45:58+00:00

I’m diving into iOS development and am getting familiar with the tools. At the

  • 0

I’m diving into iOS development and am getting familiar with the tools. At the end of every day, I perform a “Run with instruments tool -> Leaks” on my app to check for any memory leaks I may have implemented that day. It rarely seems to detect any leaks and, while I’d like to think I’m just a natural iOS programmer, I refuse to believe that 😉

Anyhow, I just found what I think is a memory leak in my code and it doesn’t get caught by Instruments. I have this line of code…

gkSession = [[GKSession alloc] initWithSessionID:@"testID" displayName:@"Temp Display Name" sessionMode:GKSessionModeClient];

and I found that I wasn’t calling release anywhere in my code. My questions are…

  1. Is this a memory leak?
  2. If so, what are some reasons that Instruments might not catch it?

My obvious concern is that I have memory leaks in my code and Instruments isn’t catching them.

Thanks so much in advance for your help!

  • 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-16T00:45:58+00:00Added an answer on May 16, 2026 at 12:45 am

    There are multiple types of dynamically allocated memory.

    1. Memory with a reference count
      greater than zero which is still referenced and is in use.

    2. Memory with a reference count
      of zero which is still referenced and is still in use.

    3. Memory with a reference count greater than zero which is not referenced.

    4. Memory with a reference count of zero which is not referenced.

    5. Memory with a reference count
      greater than zero which is still referenced and is NOT in use.

    Type one is normal in use memory. Type two is a bug that will be reported as an illegal access when you try to follow the reference. Type 3 is the type of leak that instruments detects. Type 4 should be freed by the memory system.

    Type 5 is a leak which cannot be detected by instruments, and will also not be handled by a full garbage collector. This is what you seem to have.

    EDIT:

    I forgot type 6 — Memory with a reference count that doesn’t match the number of actual references. This will probably eventually turn into type 2 or 4.

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

Sidebar

Related Questions

No related questions found

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.