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

  • Home
  • SEARCH
  • 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 6207365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:37:01+00:00 2026-05-24T05:37:01+00:00

Is an NSMapTable the same as an NSMutableDictionary except for allowing keys to be

  • 0

Is an NSMapTable the same as an NSMutableDictionary except for allowing keys to be pointers?

Does it differ in memory management?

  • 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-24T05:37:02+00:00Added an answer on May 24, 2026 at 5:37 am

    The main difference between NSMapTable and NSMutableDictionary is that NSMapTable stores weak pointers. This means that when you call smth like this:

    [my_table setValue: val forKey: key];
    

    the value and key are not retained (it means no retain message is sent to them). That’s why you can use any object (or maybe not object but any pointer) cause they don’t have to respond to retain message.

    So you probably want to use NSMapTable if you’re using garbage collection where you don’t need to bother about retain count of an object.

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

Sidebar

Related Questions

I'm using NSMapTable in a program that must run under both 3.0 and 2.2.1.
How to get contents of NSMutableDictionary into NSMutable array? I am trying following but
I want to store my CGPoint to the NSMutable Array, so , I have
I am new to iPhone development. I want a Nsmutable array to hold numbers
I have stored values in NsMutableDictionaries . ThenI stored all the dictionaries in NSMutable
I have 2 arrays, 1 in the viewDidLoad method and 1 in the add
I've found a bunch of posts on this problem and have actually managed to
I have NSMutableArray day which contain (6 NSMutable arrays) arrays contain class Lesson{ NSString
I have added sprites to my NSMutable Array now I'd like to get to
While replacing or inserting into an NSMutable array, I am getting exception as: Terminating

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.