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

The Archive Base Latest Questions

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

I would like to get some opinion about best practice in iOS5 and higher

  • 0

I would like to get some opinion about best practice in iOS5 and higher (ARC enabled). For example, I have a database with cars – image, name, max speed, etc. info. In app I have to show a car with info, then, after user interaction – next car, then next… without any moving to previous one.

If I have a class Car, then which would be better solution and why?

Solution 1:
on the first time to create an instance of Car, using alloc and init and then, every time, when I have to show the next one – just update this instance with new data by changing existing values (speed from 250 to 180, color from black to red, etc.)

Solution 2:
every time use alloc and init, allowing ARC to free the memory previously taken and just forgetting about previously allocated objects.

Solution 3:
probably there are also other solutions, how to solve this problem – I’m eager to hear them.

Thanks in Advance

  • 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-11T20:12:17+00:00Added an answer on June 11, 2026 at 8:12 pm

    If your class is really a Car class, it should represent one car in your database and not be some kind of handler object to show database entries. If you want to do that, you should at least make it a class that is properly named and configured to do that kind of work.

    There is nothing wrong with creating a Car instance for every car you read from your database.

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

Sidebar

Related Questions

I would like to get some nested params. I have an Order that has
I have a number of links which I would like to get some information
I would like some opinion, example and code on how everyone dose this.. So
I would like to get some information on list of points that needs to
I would like to get some feedback on what is one of my first
I would like to get some clarification regarding lazy loading and session boundaries etc.
What I would like to get some input on is how to remove certain
I'm new on this, and I would like to get some advice because I
I would like to get contents of some stream or project I can find
I would like to get to know how to redirect output of some program

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.