What is Exact difference between strong and weak property in ios and if ARC is there then why to use strong instead of retain and weak instead of assign?
Asked
Active
Viewed 3,241 times
1 Answers
1
You should look a little bit more in the internet for that question. It is a very common one you should find an answer easily.
Basically strong property are retained and weak are not. For an object you should use weak instead of assign because when released the weak property will be set to nil (not the assign). Keep assign for basic type (int, float, etc.) In ARC strong is defined as retain.
Most of the time: - for object property (array, dictionnary, etc.) use strong. - for delegates use weak. - for basic type (int, float, etc.) use assign.
You will find more detailed answers all over the internet.

kokluch
- 602
- 5
- 16
-
Hi kokluch what you are saying is right but on internet i haven't got exact answer what i was expecting on internet.Anyways thanks for your answer. – Suraj SS Aug 11 '14 at 05:36
-
That post is quite detailed but you need to know how retain count works. ARC doesn't help because it does everything by itself. Hope it will help. Thks for validation. http://stackoverflow.com/questions/8927727/objective-c-arc-strong-vs-retain-and-weak-vs-assign – kokluch Aug 11 '14 at 10:09