@@ -2830,8 +2830,9 @@ deallocation.
2830
2830
If ``[take] `` is specified then the underlying weak reference is invalidated
2831
2831
implying that the weak reference count of the loaded value is decremented. If
2832
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.
2833
+ affected by this operation (i.e. it is a +0 weak ref count operation). In either
2834
+ case, the strong reference count will be incremented before any changes to the
2835
+ weak reference count.
2835
2836
2836
2837
This operation must be atomic with respect to the final ``strong_release `` on
2837
2838
the operand heap object. It need not be atomic with respect to ``store_weak ``
@@ -2851,9 +2852,12 @@ Initializes or reassigns a weak reference. The operand may be ``nil``.
2851
2852
2852
2853
If ``[initialization] `` is given, the weak reference must currently either be
2853
2854
uninitialized or destroyed. If it is not given, the weak reference must
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.
2855
+ currently be initialized. After the evaluation:
2856
+
2857
+ * The value that was originally referenced by the weak reference will have
2858
+ its weak reference count decremented by 1.
2859
+ * If the optional is non-nil, the reference in the optional's strong reference count is not
2860
+ affected.
2857
2861
2858
2862
This operation must be atomic with respect to the final ``strong_release `` on
2859
2863
the operand (source) heap object. It need not be atomic with respect to
0 commit comments