File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2827,6 +2827,12 @@ which must be an initialized weak reference. The result is value of type
2827
2827
``$Optional<T> ``, except that it is ``null `` if the heap object has begun
2828
2828
deallocation.
2829
2829
2830
+ If ``[take] `` is specified then the underlying weak reference is invalidated
2831
+ implying that the weak reference count of the loaded value is decremented. If
2832
+ ``[take] `` is not specified then the underlying weak reference count is not
2833
+ effected by this operation (i.e. it is a +0 weak ref count operation). In either
2834
+ case, the strong reference count will be incremented.
2835
+
2830
2836
This operation must be atomic with respect to the final ``strong_release `` on
2831
2837
the operand heap object. It need not be atomic with respect to ``store_weak ``
2832
2838
operations on the same address.
@@ -2845,7 +2851,9 @@ Initializes or reassigns a weak reference. The operand may be ``nil``.
2845
2851
2846
2852
If ``[initialization] `` is given, the weak reference must currently either be
2847
2853
uninitialized or destroyed. If it is not given, the weak reference must
2848
- currently be initialized.
2854
+ currently be initialized and after the evaluation the value that was originally
2855
+ referenced by the weak reference will have its weak reference count decremented
2856
+ by 1.
2849
2857
2850
2858
This operation must be atomic with respect to the final ``strong_release `` on
2851
2859
the operand (source) heap object. It need not be atomic with respect to
You can’t perform that action at this time.
0 commit comments