Objective-C weak declaration

I was looking at a sample of Apple code for my 2014 WWDC “Advanced User Interfaces with Collectible Views” and came across a weak ad that looked like this:

__weak typeof(&*self) weakself = self;

My question is: what does & * mean in the declaration? Why not just have:

__weak typeof(self) weakself = self;

Thank you for your help.

+4
source share
2 answers

Why not just have:

__ weak type (self) weak self = self;

You can. This is a normal way to do this. Some previous version of the compiler did not handle it properly, but it was fixed a long time ago.

0
source

self MyInstance *. *self, self* self. , &(*self), .

-1

Source: https://habr.com/ru/post/1547102/


All Articles