property “assign” and “retain” for delegate

For iOS developers, delegates are used almost everywhere.

And seems like that we need to use "assign" instead of retain for a delegate like this

@property(assign) id delegate;

The reason is to avoid the circular loop issue Why are Objective-C delegates usually given the property assign instead of retain?

I saw a lot of code and they still used "retain". So the question here is will we still get the circular loop issue if we use retain for a delegate?

Thanks

16
задан Community 23 May 2017 в 10:34
поделиться