Coagulable stone! I understand that probably the topic has been traveled far and wide! But nonetheless!

When retain, readonly, readwrite, copy, assign, strong?

I read a lot of material, I found a lot more - but the porridge in my head only became thicker on this issue (

Get out!

Maybe there is a link to the available description, can enlighten here!

    1 answer 1

    Yes there, in general, all the names are:

    retain - when you need to get a link to an object and not release it while it is needed, strong is almost the same, but for ARC

    readonly is a read-only property, often it is not tied to a specific field, but dynamically generated in a getter

    assign - when you need to have a link, but you do not need to control the lifetime of the object, usually it is the delegates, after the introduction of the arch is replaced by a weak main plus of which auto-reset to the Nile when the object is released

    copy - during assignment a copy of the object is made i. A new object is created with the same parameters, and the link is not simply stored.