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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:16:26+00:00 2026-06-11T16:16:26+00:00

I am somewhat lost on how to declare properties in my Singleton. Should I

  • 0

I am somewhat lost on how to declare properties in my Singleton. Should I use strong or weak? Particularly I have an NSMutableArray property and I am not sure what to do. Can someone explain in some what detail?

Thanks

  • 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-11T16:16:27+00:00Added an answer on June 11, 2026 at 4:16 pm

    This has nothing to do with Singletons, and depends entirely on how your array is being used. Is it private? Public? Readonly? Readwrite? It just depends on ownership, like everything else. If your singleton owns the array, use strong or copy. Otherwise use weak.

    That said, it’s not typically a good idea to directly expose a mutable collection at all. If you only need other classes to be able to read it, use an NSMutableArray internally, and expose an NSArray copy publicly. If other classes need to mutate the collection, it’s better practice to expose a set of KVC-compliant methods that mutate an internal mutable array.

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

Sidebar

Related Questions

Maybe I'm somewhat over-worked ... I'm lost in a project where I use EF4
I am sure that I am somewhat lost in this area... my understanding is
I've never had this issue before, so I'm somewhat lost. I'm getting two different
This is somewhat complex (well to me at least). Here is what I have
I have a somewhat strange issue with visual studio. Almost every time I create
I am somewhat new to android development and development in general. I have a
I have a somewhat complex custom user control, created in C# .NET, which is
I am somewhat lost in merges. I develop in a single branch and merge
I apologize in advance for this somewhat ignorant question, but I have researched this
I have a XML structure somewhat like this: <root> <a/> <b/> <b/> <a/> <a/>

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.