Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Difference between retain and assign ?

Answer Posted / babu

Assign and retain was used in manual memory management (MRC) environment.

assign to set a property’s pointer to the address of the object without retaining it. use weak to have the property point to nil automatically if the object assigned to it is deallocated .

Use retain by default and will manage the object’s reference count automatically whether another object is assigned to the property or it’s set to nil; In ARC you will use strong instead of retain.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Please explain what is difference strong and weak reference?

692


What is the difference between cocoa and cocoa touch?

704


What is the difference between let and var in swift?

861


Why do you generally create a weak reference when using self in a block?

835


What is nspersistentstore? Is it thread safe?

899


What are design patterns in ios?

859


How to parse xml?

744


What is bundle id?

801


What is a delegate xcode?

824


Ellaborate viper architecture?

842


What is synchronous vs. Asynchronous in gcd ?

750


Why is iboutlet weak?

778


How we can do multithreading in ios?

799


What is nspersistentstorecoordinator? What duties does it perform?

764


Explain what is storyboard?

729