Check this SO question, there's a good answer there with details describing GCD's lack of cancellation features.
Other than that, if you try executing this code and checking the value of wself
and self
(separately, comment out self when checking wself) by the time the block executes, you'll see that wself
becomes nil
whereas self
still has a value.. so I think you're right in avoiding directly referencing self
here. If you check both wself
and self
in the same block, you'll wself
still has a value also. So this block is able to basically keep self
alive a little longer if you directly reference it within the block. So using wself
will ensure that you don't inadvertently keep the thing alive longer than it's intended to, and thus the selector doesn't actually end up doing anything.
So you could either check whether wself
has become nil
in the block when it executes, or you could just rely on Objective-C's ability to quietly do nothing when passing a message to nil
(as long as it's not an unrecognized selector).