I would like to get some feedback on best practices in iOS5 and above (ARC enabled). For example, I have a database with cars - image, name, maximum speed, etc. Info. In the application, I have to show the car with the information, then, after interacting with the user, the next car, then the next ... without any transition to the previous one.
If I have a Car class, what would be the best solution and why?
Solution 1: the first time to create an instance of Car using alloc and init, and then, every time I have to show the next one, just update this instance with new data, changing the existing values ββ(speed from 250 to 180, color from black to red, etc.)
Solution 2: use alloc and init each time, allowing ARC to free up previously saved memory and just forget about previously allocated objects.
Solution 3: there are probably other solutions how to solve this problem - I really want to hear them.
Thanks at Advance
source share