diff options
| author | John McCall <rjmccall@apple.com> | 2011-07-13 23:15:32 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2011-07-13 23:15:32 +0000 |
| commit | 7c3ed3d0c5f4b644c5e4e2234864a3fc70ac2226 (patch) | |
| tree | 071a933ca1676d438d6bba898e2c80ec8add9db8 /clang/docs/AutomaticReferenceCounting.html | |
| parent | d11ea81db0df04e5ed8ae25261ff83625de115ba (diff) | |
| download | bcm5719-llvm-7c3ed3d0c5f4b644c5e4e2234864a3fc70ac2226.tar.gz bcm5719-llvm-7c3ed3d0c5f4b644c5e4e2234864a3fc70ac2226.zip | |
Document the behavior of property modifiers in ARC.
rdar://problem/9768338
llvm-svn: 135104
Diffstat (limited to 'clang/docs/AutomaticReferenceCounting.html')
| -rw-r--r-- | clang/docs/AutomaticReferenceCounting.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/clang/docs/AutomaticReferenceCounting.html b/clang/docs/AutomaticReferenceCounting.html index 244f9e6a1fc..5090fa2b795 100644 --- a/clang/docs/AutomaticReferenceCounting.html +++ b/clang/docs/AutomaticReferenceCounting.html @@ -686,6 +686,43 @@ type.</p> <p>If an ownership qualifier appears anywhere else in a declarator, it applies to the type there.</p> +<div id="ownership.spelling.property"> +<h1>Property declarations</h1> + +<p>A property of retainable object pointer type may have ownership. +If the property's type is ownership-qualified, then the property has +that ownership. If the property has one of the following modifiers, +then the property has the corresponding ownership. A property is +ill-formed if it has conflicting sources of ownership, or if it has +redundant ownership modifiers, or if it has <tt>__autoreleasing</tt> +ownership.</p> + +<ul> +<li><tt>assign</tt> implies <tt>__unsafe_unretained</tt> ownership.</li> +<li><tt>copy</tt> implies <tt>__strong</tt> ownership, as well as the + usual behavior of copy semantics on the setter.</li> +<li><tt>retain</tt> implies <tt>__strong</tt> ownership.</li> +<li><tt>strong</tt> implies <tt>__strong</tt> ownership.</li> +<li><tt>unsafe_unretained</tt> implies <tt>__unsafe_unretained</tt> + ownership.</li> +<li><tt>weak</tt> implies <tt>__weak</tt> ownership.</li> +</ul> + +<p>With the exception of <tt>weak</tt>, these modifiers are available +in non-ARC modes.</p> + +<p>A property's specified ownership is preserved in its metadata, but +otherwise the meaning is purely conventional unless the property is +synthesized. If a property is synthesized, then the +<span class="term">associated instance variable</span> is the +instance variable which is named, possibly implicitly, by the +<tt>@synthesize</tt> declaration. If the associated instance variable +already exists, then its ownership qualification must equal the +ownership of the property; otherwise, the instance variable is created +with that ownership qualification.</p> + +</div> <!-- ownership.spelling.property --> + </div> <!-- ownership.spelling --> <div id="ownership.semantics"> |

