What is [weak self]?


(Jeff Kelley) #1

Just looking for a technical term here: what is [weak self] at the beginning of a closure? An annotation? Thanks in advance!

Jeff Kelley

SlaunchaMan@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/>


(Jacob Bandes-Storch) #2

It's a "capture list":
https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html#//apple_ref/doc/uid/TP40014097-CH20-ID56

Jacob Bandes-Storch

···

On Mon, Dec 14, 2015 at 8:50 PM, Jeff Kelley via swift-users < swift-users@swift.org> wrote:

Just looking for a technical term here: what is [weak self] at the
beginning of a closure? An annotation? Thanks in advance!

Jeff Kelley

SlaunchaMan@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> |
jeffkelley.org

_______________________________________________
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


(Jeff Kelley) #3

Thank you!

Jeff Kelley

SlaunchaMan@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/>

···

On Dec 14, 2015, at 11:51 PM, Jacob Bandes-Storch <jtbandes@gmail.com> wrote:

It's a "capture list": https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/AutomaticReferenceCounting.html#//apple_ref/doc/uid/TP40014097-CH20-ID56

Jacob Bandes-Storch

On Mon, Dec 14, 2015 at 8:50 PM, Jeff Kelley via swift-users <swift-users@swift.org <mailto:swift-users@swift.org>> wrote:
Just looking for a technical term here: what is [weak self] at the beginning of a closure? An annotation? Thanks in advance!

Jeff Kelley

SlaunchaMan@gmail.com <mailto:SlaunchaMan@gmail.com> | @SlaunchaMan <https://twitter.com/SlaunchaMan> | jeffkelley.org <http://jeffkelley.org/>

_______________________________________________
swift-users mailing list
swift-users@swift.org <mailto:swift-users@swift.org>
https://lists.swift.org/mailman/listinfo/swift-users