Question

I am creating an iPhone application, in that I used ARC for memory management. In this application user has the option for login and logout. So, any user can login to their account at any time from the same device.

So, I think, as I am using ARC, the releasing of the objects is happening at some points in the future. So, when multiple users login does that cause any issue? Like should I manually send release message to all the objects in the autorelease pool when a user logout?

Please share your ideas. Thanks in advance.

Était-ce utile?

La solution

ARC automatically manages "autorelease" objects so that you don't need to worry about it. Under ARC I don't think it is even possible to send a release message to the pool. It will automatically release those objects when it decides they are no longer needed.

Autres conseils

Never manually release objects with ARC. With ARC all the releases are automatically handled. If your concern is over the fact whether data of the first user gets lost then answer is no. When new user logs in new instances of variables are created. thats all.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top