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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:06:42+00:00 2026-06-03T07:06:42+00:00

They changed some things with Xcode 4, so I was wondering if I needed

  • 0

They changed some things with Xcode 4, so I was wondering if I needed to initialize an NSSet by

NSMutableSet *variablesUsed = [NSMutableSet set];

or is

NSMutableSet *variablesUsed;

sufficient? Or does the second option initialize to nil? Is that the same as empty set?

Thanks 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-06-03T07:06:43+00:00Added an answer on June 3, 2026 at 7:06 am

    If you just use NSMutableSet *variablesUsed; then you will get a pointer which is set to nil and therefore will not be pointing to any kind of set. nil means that it is set to nothing, and is not the same thing as an empty set. You will get no functionality out of nil so you will then need to set variablesUsed to some “real” set in order to make much use of it.

    When you use NSMutableSet *variablesUsed = [NSMutableSet set]; or NSMutableSet *variablesUsed = [[NSMutableSet alloc] init]; you are setting the pointer to a brand new, empty set which has been initialized and is ready to use.

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

Sidebar

Related Questions

I made changes to some files i had in a project (they were auto
Strings are immutable, meaning, once they have been created they cannot be changed. So,
How does Stack Overflow show the revision changes in the diff-like format they use?
I am wondering what these greens things are in Visual Studio 2010. What are
Does anyone know why things like: <a href=# onClick=javascript_foo_function(1,'foo',34); return false;> Cause most antivirus
Sorry I saw similar questions but they don't seem to have some full answers
Closures are an incredibly useful language feature. They let us do clever things that
In order to specify some things first: The user should be able to create
Some examples of light content management systems: CushyCMS Surreal CMS Unify What they have
I was wondering if you could help me, Im trying to set an expiration

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.