Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The default/implicit values are <code>atomic</code>, <code>readwrite</code>, and <code>assign</code>.</p> <p><strong>atomic</strong></p> <p>This means that the value is read/written atomically. Contrary to the somewhat popular misconception, atomicity does <em>not</em> equate to thread safety. In simple terms, it guarantees that the value you read or write will be read or written in whole (when the accessors are used). Even when you use accessors all the time, it's not strictly thread safe.</p> <p><strong>readwrite</strong></p> <p>The property is given a setter and a getter.</p> <p><strong>assign</strong></p> <p>This default is usually seen used for POD (Plain-Old-Data) and builtin types (e.g. <code>int</code>).</p> <p>For <code>NSObject</code> types, you will favor holding a strong reference. In the majority of cases, you will declare the property <code>copy</code>, <code>strong</code>, or <code>retain</code>. <code>assign</code> performs no reference count operations. See also: <a href="http://clang.llvm.org/docs/AutomaticReferenceCounting.html#property-declarations">http://clang.llvm.org/docs/AutomaticReferenceCounting.html#property-declarations</a></p> <p><strong>strong</strong></p> <p>The property may be implicitly <code>strong</code> under ARC in some cases:</p> <blockquote> <p>A property of retainable object pointer type which is synthesized without a source of ownership has the ownership of its associated instance variable, if it already exists; otherwise, [beginning Apple 3.1, LLVM 3.1] its ownership is implicitly strong. Prior to this revision, it was ill-formed to synthesize such a property.</p> </blockquote>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload