1

What's the difference between:

__weak __typeof(&*self)weakSelf = self

and

__weak __typeof(self)weakSelf = self

anyone know this?

Meniny
  • 660
  • 8
  • 22

1 Answers1

2

Use 0xced's answer:

In the latest clang version Apple clang version 4.0 (tags/Apple/clang-421.1.48) (based on LLVM 3.1svn), i.e. Xcode 4.4+, the __typeof__((__typeof__(self))self) trick is not necessary anymore. The __weak typeof(self) bself = self; line will compile just fine.

https://stackoverflow.com/a/11226768/630195

Community
  • 1
  • 1
TianGeng
  • 64
  • 2